Linux switch commands

Source: Internet
Author: User
Tags disk usage

1. Because many programs are resident in the memory during the operation of Linux, the disk usage efficiency of Linux is high, the asynchronous Disk/memory data transmission mode is used. Therefore, the Linux system is afraid of abnormal shutdown!

2 Linux is a multi-tasking and multi-user system

Open the terminal:
JMZ @ JMZ-desktop :~ $
JMZ: Current User Name
Followed by the computer name
After it is enabled, it is in the home directory of the current user by default ,~ /Home/JMZ
$ Is the prompt symbol of a common user.

If it is a root user, the prompt symbol is #. The root home directory is/root, which is also used ~ .

Use root with caution. Generally, the root identity is used only when the system is modified. A System Administrator usually has a common account to access computer resources.

3 shell command:

Command Option parameter 1 parameter 2 .....
Case Sensitive

1) Date time
2) Cal date
3) BC Calculator

4) Man and info are used to view the details of a command.

4 shut down, log out, and restart

Name: Shutdown
  
Permission: System Administrator
  
Usage: shutdown [-T seconds] [-rkhncff] time [Message]
  
Note: shutdown can be used to shut down the program and send a message to all users before shutdown. Shutdown can also be used to restart the system.
  
Parameters:
  
-T seconds: Set to shut down the program in seconds.
-K: it does not actually shut down, but only sends the warning message to all users.
-R: reboot after Shutdown
-H: Shut down after Shutdown
-N
-C: cancels the shutdown action that is currently in progress.
-F: do not perform fcsk operations when shutting down (check the Linux File System)
-F: Forces The fsck action when the instance is shut down.
Time: Set the shutdown time
Message: warning message sent to all users

Name: Halt
Permission: System Administrator
Usage: Halt [-N] [-W] [-D] [-F] [-I] [-p]
Note: If the runlevel of the system is 0 or 6, the system is shut down. Otherwise, the shutdown command (with the-h Parameter added) is used to replace the system.
Parameters:
-N: Do not write the memory data back to the hard disk before shutdown.
-W: it does not actually shut down, but only writes the records to the/var/log/wtmp file.
-D: Do not write the record to the/var/log/wtmp file (-N contains-d)-f: Force shutdown. Do not call the shutdown command.
-I: Stop all network-related devices before shutdown.
-P: When the instance is shut down, the power off operation will be performed by the way.
Example:
Turn off the power after halt-P shuts down the system.
Halt-D shut down the system, but no record is left.

Name: reboot
Permission: System Administrator
Usage: reboot [-N] [-W] [-D] [-F] [-I]
Note: If the runlevel of the system is 0 or 6, restart the system. Otherwise, replace the shutdown command with the-R parameter.
Parameters:
-N: Do not write the memory data back to the hard disk before restarting.
-W: The record is not written to the/var/log/wtmp file.
-D: Do not write the record to the/var/log/wtmp file (-N contains-d)-f: Force reboot, do not call the shutdown command
-I: Stop all network-related devices before restarting.
Example:
Reboot restarts.
Reboot-W is used as a reboot simulation (only record does not actually reboot ).

Linux common command set: http://linux.chinaitlab.com/special/linuxcom/

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.