Linux basic commands 1.0

The first lesson to learn Linux is to remember the various commands, but all of a sudden remember too many command novice very friendly, so I combine their own learning experience, the most basic Linux commands and most commonly used parameters do a simple subtotals.
A total of 41 command, finishing in two phases
reference books: "Linux in respect of such a study."

Common work order system

1.echo command:

echo command value for the output terminal extraction string or variable, the format of "echo [String | $ variable]."

2.date command:

The time or date date display command and set the system in the format of "date [option] [format specified +]." Just enter the date in a strong command to "+" parameters at the beginning of the number, you can follow the specified format to output the time or date of the system, so that we can command the time to back up data to the specified output format information in their daily work combined together.

date parameters in the command and the role of

Parameters ------------------------------- role
% H --------------- ---------------- h (~ 23 is 00)
% M -------------------------- ----- min (00 to 59)
% S ------------------------------- seconds (00 to 59)
% j ------------------------------- day of the year,
more arguments role can use the command: date - -help View

date command parameters% j can be used to view today is the first day of the year.
This parameter can be a good distinction between the old and new backup time, that the larger the number, the closer the current time.
Use of this parameter: date "+% j"

3.reboot command:

reboot command is used to restart the system, the format: reboot.

4.shutdown / poweroff command:

shutdown / poweroff command to shut down the system, typically used to power off shutdown.

5.wget command

wget command to download a file in a network terminal, the format of "wget ​​[parameters] Download"

wget command parameters and the role

Parameters ------------------------------- role
-b --------------- ---------------- background download mode
-P ----------------------------- - downloaded to the specified directory
-c ------------------------------- HTTP
-p ----- -------------------------- within the download page for all resources, including images, videos, etc.
-r ----------- -------------------- recursive downloads

6.ps command

ps command is used to view the system status of the process in the format of "ps [parameters]"

ps command parameters and the role

Parameters ------------------------------- role
-a --------------- ---------------- show all processes (including processes of other users)
-u ---------------------- --------- users, and other details
-x ------------------------------- show no control process in a terminal

In the Linux system, there are five kinds of process status, were run, interrupt, can not be interrupted, and stopped dead, as shown in their respective meanings as follows.

R (running): process is running or waiting in the run queue.

S (Interrupt): the process is sleeping when the conditions for forming a signal is received or, if out of this state.

D (uninterruptible): Process system does not respond to asynchronous signals, even with the kill command nor can it be interrupted.

Z (zombie): the process has been terminated, but the process descriptor remain until the parent calls wait4 () function will process system release.

T (Stop): Stop running after process receives a stop signal.

In the Linux system command parameters are sub-length format, and the format can not be combined length between the long format, it can not be merged between the long and short forms, but between the short and short forms can be combined, consolidated only reserved a - (minus sign) can be. Further parameters ps command can not allow a minus sign (-), and therefore can be directly written ps aux like.

7.top command

top command is used to dynamically monitor process activity and system load, the format top. The top command is quite powerful and can dynamically view the status of system operation and maintenance, complete it as Linux in "enhanced version of the Windows Task Manager."

8.pidof command

PID values ​​pidof command queries a specified service process, the format is "pidof [parameters] [service name]."

Process value for each process number (PID) is unique, so different processes can be distinguished by the PID.

9.kill command

Service process kill command terminates a specified PID, the format is "kill [parameters] [process PID]."

10.killall command

killall command is used to terminate all processes specify the name of a service corresponding to the format: "killall [parameters] [process name]."

Guess you like

Origin www.cnblogs.com/shing-virus/p/11117887.html