点滴

IT博客 首页 新随笔 联系 聚合 管理
  103 Posts :: 81 Stories :: 50 Comments :: 0 Trackbacks
阅读了Red Hat Enterprise Linux Step By Step Guide.kaka.pdf后,回顾一些模糊的知识点。

1:To close man or Info pages, press [q].
2: you can type the command startx to start the graphical desktop.
3: Red Hat Enterprise Linux installs GNOME as the default desktop.
4: To exit a shell prompt, click the X button on the upper right corner of the shell prompt window, type
exit at the prompt, or press [Ctrl]-[D] at the prompt.
5: Your password should be at least six characters.
6: To navigate the man page you can use the "arrow" keys or use the [Spacebar] to move down one page
and [B] to move up. To exit the man page, type [Q].
To search a man page for keywords type [/] and then a keyword or phrase and press [Enter]. All
instances of the keyword will be highlighted throughout the man page, allowing you to quickly read
the keyword in context.
7: To install all of the Red Hat Enterprise Linux manuals, change
to the directory that contains the RPM _les and type the following:  rpm -ivh rhl-*.rpm
8: To shutdown your computer at a shell prompt, type the following command:halt
9: you must _rst unmount a _oppy before you eject it.
10: list the _les in your home
directory by entering the command ls -al. If you view the hidden _les in your home directory,
11: To use bzip2 to compress a _le, enter the following command at a shell prompt:
bzip2 filename
The _le is compressed and saved as filename.bz2.
To expand the compressed _le, enter the following command:
bunzip2 filename.bz2
12: bash is the default shell for interactive users.
13: Press [Ctrl]-[R] and type
the beginning of the command you previously issued.
14: To clear your command history, type history -c.
15: By default, Red Hat Enterprise Linux stores 1000 commands.
16: For example, oowriter & starts OpenOf_ce.org Writer
17: If you have started an application or process and forgotten to add the &, _rst press [Ctrl]-[Z] . this
suspends the application. To allow it to continue running without displaying standard output, type bg
and press [Enter]. This is referred to as running the application in the background.
18: The asterisk, "*", represents any character or string of characters. The entry a*.txt could refer to
ab.txt as well as aardvark.txt.
The question mark represents a single character. The entry a?.txt could refer to ab.txt and
a1.txt, but not aardvark.txt.
19: If the _le is called sneak*.txt, type:
sneak\*.txt
Here is a brief list of wildcards and regular expressions:
. * . Matches all characters
. ? . Matches one character
. \* . Matches the * character
. \? . Matches the ? character
. \) . Matches the ) character
20: [Ctrl]-[K] While editing a command on the command line, this key combination
deletes everything that has been typed in from the cursor's current
position forward.
[Ctrl]-[D] Pressing this key combination once ends the current application or
process. Pressing it twice exits the shell.
[Ctrl]-[R] At the command line, [Ctrl]-[R] searches through the command history to
_nd the entry that starts with the letters you type.
[Ctrl]-[Z] Suspends the current application. Entering bg after [Ctrl]-[Z] causes a
program to run in the background.
[Ctrl]-[C] "Kills" a program. This should be a last resort. Try stopping a program
with other methods _rst.
[Ctrl]-[L] Clears the terminal window.
21: To clear the terminal, enter the command clear at the shell prompt. The clear command clears the
terminal, leaving only a new shell prompt at the top of the window.
You can also clear the screen using the keystroke [Ctrl]-[L].
22: Copy a _le cp cp filename destination Copies the _le _lename to the
ls ls The ls command lists _les in
To move a _le from one
directory to another, use mv.
Rename a _le mv mv oldname newname The use of the mv command
23: To view all ls command options, read the man page by entering man ls at a shell prompt. To print
the man page, enter man ls | col -b | lpr at the prompt.
24: cp original_file /dir1/dir2/new_file
This creates a new _le named new_file with the contents of original_file in dir2/.
25: cp /dir1/dir2/filename .
The above command places a copy of filename in your current working directory.
26: You can only move _les to a directory that already exists: Linux will not create a new directory with
the mv command.
27: mv original_name /dir1/dir2/dir3/new_name
The above command moves the _le original_name from the current working directory to directory
dir3/ and renames it new_name.
28: Deleting a _le with rmis permanent . you cannot un-delete it.
29: The rmdir command will only delete directories that are empty.
If you want to delete a directory and all of its contents, use the command rm -rf. Note that if you
enter rm -rf, the shell will not ask if you are sure before permanently deleting the directory.
rm -rf /dir1/
The above command deletes /dir1/ and every _le and sub-directory that exists inside.
30: find . -name foo
The above command searches through the current working directory for all _les with "foo" in their
name.
31: The more command is a "pager" utility used to view text in the terminal window one page or screen
at a time. The [Space] bar moves forward one page and [Q] quits.
32: cat <filename> | less
The above command opens the _le named <filename> using the cat command, but does not
allow it to scroll off the screen.
33: drwx------ (700) Only the user can read, write in this directory.
drwxr-xr-x (755) Everyone can read the directory; users and groups have
read and execute permissions.
34: gpdf /home/user/PDF/foo.pdf
ggv /home/user/PS/bar.ps
35: The X Con_guration Tool backs up your system's original video con_guration _le to
/etc/X11/XF86Config.backup in case you need it to switch back to a previous con_guration.
36: 1. Insert a CD or DVD into the appropriate drive.
2. Open a terminal window.
3. At the shell prompt, enter the command mount /media/cdrom/.
The CD or DVD is now mounted and available for use. You can unmount and eject the CD or DVD
by entering the command umount /media/cdrom/. You can then safely press the eject button on
your CD or DVD drive to retrieve the disk.
37: 1. Open a terminal window.
2. Enter the command mount /media/<manufacturer>/.
38: You can log in using single-user mode and create a new root password.
To enter single-user mode, reboot your computer. If you use the default boot loader, GRUB, you can
enter single user mode by performing the following:
1. At the boot loader menu, use the arrow keys to highlight the installation you want to edit and
type [A] to enter into append mode.
2. You are presented with a prompt that looks similar to the following:
grub append> ro root=LABEL=/
3. Press the Spacebar once to add a blank space, then add the word single to tell GRUB to boot
into single-user Linux mode. The result should look like the following:
ro root=LABEL=/ single
4. Press [Enter] and GRUB will boot single-user Linux mode. After it _nishes loading, you will
be presented with a shell prompt similar to the following:
sh-2.05b#
5. You can now change the root password by typing
passwd root
39: If you are not logged in when you realize you have forgotten your password, log in as the root user.
Open a shell prompt and enter the command passwd username, where username is your normal
user name. The passwd command requires you to enter the new password twice. Log out of your
system. You can now log back in with your normal user name and your new password.
40: gedit /etc/fstab
Add the following on a new line (replacing /dev/hda1 with the Windows partition you found via
Hardware Browser):
/dev/hda1 /mnt/windows vfat auto,umask=0 0 0
41: type gedit /etc/inittab to edit the _le with gedit. The _le /etc/inittab will open.
Within the _rst screen, you will see a section of the _le which looks like this:
 Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
42: . /bin/. Used to store user commands. The directory /usr/bin/ also stores user commands.
. /sbin/ . Location of many system commands, such as shutdown. The directory /usr/sbin/
also contains many system commands.
. /root/. The home directory of root, the superuser.
. /misc/ . This directory is used for automatically mounting directories on removeable devices
(such as Zip drives) and remote directories (such as NFS shares) using autofs. Refer to the autofs
manual page (type man autofs at a shell prompt) for more information.
. /mnt/ . This directory typically contains the mount points for _le systems mounted after the
system is booted.
. /media/. This directory contains the mount points for removable media, such as diskettes, CDROMs,
and USB _ash drives.
. /boot/. Contains the kernel and other _les used during system startup.
. /lost+found/. Used by fsck to place orphaned _les (_les without names).
. /lib/.Contains many device modules and library _les used by programs in /bin/ and /sbin/.
The directory /usr/lib/ contains library _les for user applications.
. /dev/. Stores device _les.
. /etc/. Contains con_guration _les and directories.
. /var/. For variable (or constantly changing) _les, such as log _les and the printer spool.
. /usr/ . Contains _les and directories directly relating to users of the system, such as programs
and supporting library _les.
. /proc/ . A virtual _le system (not actually stored on the disk) that contains system information
used by certain programs.
. /initrd/.A directory that is used to mount the initrd.img image _le and load needed device
modules during bootup.
Warning
Do not delete the /initrd/ directory. You will be unable to boot your computer if you delete the
directory and then reboot your Red Hat Enterprise Linux system.
. /tftpboot/.Contains _les and applications needed for Preboot Execution Environment (PXE),
a service that allows client machines and machines without hard drives to boot an operating system
from an image on a central PXE server.
. /tmp/.The temporary directory for users and programs. /tmp/ allows all users on a system read
and write access.
. /home/. Default location of user home directories.
. /opt/. Directory where optional _les and programs are stored. This directory is used mainly by
third-party developers for easy installation and uninstallation of their software packages. 

  
  
 
posted on 2006-11-17 10:20 天空 阅读(342) 评论(0)  编辑 收藏 引用 所属分类: 骗子的linux学习
只有注册用户登录后才能发表评论。