Linux running time (3) (laruence's Private food note)-Linux general technology-Linux technology and application information. The following is a detailed description. After Linux is installed and started, the KDE environment of X Window appears. Graphical interface.
Switch X Window and command line mode: by default, Linux will provide six terminals for users to log on. When switching, use: Ctrl + Alt + F1 ~ F6 key combination. At the same time, in order to judge, the system will ~ F6 is defined as tty1 ~ Tty6 operation interface environment. Press Ctrl + Alt + F7 to return to the previous KDE.
Leave the current Linux: log out of Linux. Command Line: [root @ linux ~] # Exit
Note that leaving the system is not a shutdown. Generally, many jobs are running in Linux, and user logon is only one of them. Therefore, when a user leaves, the job stops. However, other jobs are still in progress.
Run the following command:
[Root @ linux ~] # Command [-options] parameter1 parameter2 .... (Shell is regarded as a grid regardless of the number of spaces between these items. When the command is too long, you can use the \ symbol to escape the [Enter] symbol. English letters in different upper and lower Cases)
Basic command operation:
1. Command for displaying date: date
[Root @ linux ~] # Date
[Root @ linux ~] # Date + % Y/% m/% d
[Root @ linux ~] # Date + % H: % M
2. Run the "cal" command to display the calendar.
[Root @ linux ~] # Cal
3. Calculator command: bc
[Root @ linux ~] # Bc
Scale = n (when you enter this command, the division operation can retain n decimal places )????? Is it an n-digit valid number or an n-digit decimal number?
4. Important hotkeys:
Tab: Command completion and file completion
For example: [root @ linux ~] # Ca [tab] [tab]
[Root @ linux ~] # Ls? Al ~ /. Bash [tab] [tab] (display all hidden files and related file attributes in a bash directory)
Ctrl + c: the Key to interrupt the current program
Ctrl + d: The keyboard input ends. It can also be used to replace the exit input.
5. Command for help:
Man:
[Root @ linux ~] # LANG = "en" (change Chinese to English to avoid garbled characters)
[Root @ linux ~] # Man date (query date usage)
If you know some keywords, you can enter "/word" at any time to actively search for keywords. In the search process, you can use n to continue the next search, and use N to reverse search. Q: end man page this time.
[Root @ linux ~] # Man 1 man (using man (1) file data)
Info:
Info is similar to man. Files supporting info commands are stored in the/usr/share/info/directory.
[Root @ linux ~] # Info (this can call up the info file)
6. Correct shutdown Method
[Root @ linux ~] # Sync (enter sync directly on the command line before shutting down, and data not updated in the memory will be written to the hard disk)
[Root @ linux ~] #/Sbin/shutdown [-t seconds]
Shutdown Syntax:
-T sec: Shut down after several seconds
-K: don't really shut down, just give a warning
-R: restart
-H: Shut down the system immediately after the service is stopped.
-N: directly shut down without passing through the init program
-F: After the instance is shut down and started, The fsck disk check is skipped.
-F: After the system restarts, force the fsck disk check.
-C: cancels the content of the shutdown command that is already in progress.
7. Sector disorder:
A. If the root directory is not damaged: assume that the disk block with an error is in/dev/hda7. first, log on to the system, enter fsck/dev/hda7, and restart the disk with the reboot command.
B. if the root directory is damaged: Unplug the hard disk and connect it to a computer in another Linux system. Do not mount the hard disk, run fsck/dev/hdb1 as root (/dev/hdb1 is the name of the hard disk device ).
C. If the hard disk breaks down, you need to reinstall Linux.
8. Forget the root password:
The current menu options include LILO and Grub.
LILO: When lilo of the graphic interface appears, press ctrl + x to enter lilo of the pure command.
Boot: linux? S enters the maintenance mode for a single user. Enter the passwd command to directly change the root password.
Grub: after entering the menu screen, select the Relative core file, and press "e" to enter the editing screen of the kernel line. Then, in the displayed screen, enter single:
Root (hd0, 0)
Kernel/boot/vmlinuz-2.4.19 root =/dev/hda1 single
Press enter, and then press B to guide the system.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service