must learn from the Linux command, and further understand the Linux system through basic command learning.
The number of commands for different Linux distributions is different, but there are more than 200 commands for the Linux distribution. Here, the author divides the more important and frequently used commands into the following six parts according to their role in the system.
The role of login is to log in to the system, and its usage rights are all users.
3. Main parameters
-p: Inform login to keep the current environment parameters.
linux command problem -h: used to transfer the username to the remote login.
If you choose to log in to Linux with command line mode, then the first linux command you see is login:.
The general interface is like this:
In the above code, the first line is the Linux distribution number, the second line is the kernel version number and the login virtual console, we are in the third line. Enter the login name, press enter to enter the account password after password, you can log in to the system. For security reasons, characters are not echoed on the screen when the account password is entered, and the cursor does not move.
After logging in, you will see the following interface (take the super user as an example):
The above shows the login week, month, day, time and virtual console used.
4. Application Tips
is a true multi-user operating system that can accept multiple users to log in at the same time, and allows one user to log in multiple times. This is because Linux, like many versions of Unix, provides access to the virtual console, allowing users to log in multiple times at the same time from the console (the system's console is a monitor and keyboard directly connected to the system). Each virtual console can be thought of as a separate workstation that can be switched between workbenches. Virtual console switching can be achieved by pressing the alt key and a function key, usually using f1-f6. For example, after the user logs in, press the alt+f2 key, and the user can see the login: prompt displayed above, indicating that the user has seen the second virtual console. Then just press alt+f1 to go back to the first virtual console. A newly installed Linux system allows users to access the first six virtual consoles using the alt+f1 to alt+f6 keys. The most useful thing about the virtual console is that when a program error causes the system to deadlock, you can switch to another virtual console to work and close the program.
The shutdown command is used to shut down the computer, and its usage rights are superusers.
3. Important parameters
-t: Tell the init program how long it will shut down before changing to other run levels.
-k: It doesn't really shut down, just send a warning signal to each registrant.
-h: Turn off the power after turning off the power.
-c:cancelcurrentprocess cancels the shutdown program currently being executed. So of course this option has no time parameters, but you can enter a message for explanation, and this information will be sent to each user.
-f: Force fsck when restarting your computer.
-time: Set the time before shutdown.
-m: Change the system to single-user mode.
-i: Display system information when shutting down.
4. Command Description
The command can safely shut down the system. Some users will shut down the Linux system by directly disconnecting the power supply, which is very dangerous. Because linux and windows are different, there are many processes running in the background, so forcible shutdown may result in data loss of the process, making the system unstable, and even in some systems, the hardware device (hard disk) will be damaged. Use the shutdown command before the system is shut down. The system administrator will notify all logged-in users that the system will be shut down, and the login command will be frozen, that is, the new user can no longer log in.
The halt command is used to shut down the system, and its usage rights are superusers.
3. Main parameter description
-n: Prevent sync system call, it is used after patching the root partition with fsck to prevent the kernel from overwriting the repaired super block with the old version of the super block. .
-w: It's not really a reboot or shutdown, just write a wtmp (/var/log/wtmp) record.
-f: Did not call shutdown, but forced shutdown or restart.
-i: Turn off all network interfaces before shutting down (or rebooting).
-f: Force shutdown, do not call shutdown command.
-p: When the power is turned off, the power is turned off.
-d: Shut down the system, but leave no records.
4. Command Description
is to call shutdown-h. When halt is executed, it kills the application process, executes sync (forces the data stored in the buffer to the hard disk). The system calls, and the kernel stops after the file system write operation is completed. If the system's run level is 0 or 6, shut down the system; otherwise, replace it with the shutdown command (plus the -h parameter).
The role of the reboot command is to restart the computer. Its usage rights are system administrators.
System Requirements: Unlimited release, requires PC platform (x86 architecture CPU), Glibc version
STM32 The storage medium corresponding to the three boot modes is the three boot modes corresponding
In order to ensure the normal operation of the Linux system and accurately solve various system prob
Speaking of the command, you have to mention this special command vi it is not only a command, but a
What are the benefits of using Linux/Unix as a server?
Restore deleted files under Ext3
In the Linux system, use the DD command to make the ISO image U disk boot disk
Linux installation and configuration SVN standalone server svnserve
You may not know Linux interprocess communication
Discussion on GUEST OS Clock (TIMEKEEP) in Virtual Machine
Linux Server Network Development Model
Do not blame the actual Linux operating system dual screen display
How to change keyboard input or keyboard language in win8
How to use URI with Win10 system
Win7 system laptop screen capture method
Solve the video courseware of exe format in Win8 system can not play the problem
How does the knight's story pass Du Kangcun's wine-making task?
Windows startup is getting slower and slower? Let's talk about 8 kinds of "non-master
Win7 disables USB interface, Win7 disables group policy, and win7 disables portable devices
In Win8, the 64-bit version of IE10
Using the command line parameters to patch the system
Win7 this file does not have a program associated with it to perform the operation of the solution