-01-Linux Linux foundation basic commands

1. Linux command format
1) Linux command syntax:
[Options] command Parameters
2) the specific meaning of the command format commands, options, parameters
a) command: tell Linux (UNIX) operating systems do (perform) what.
b) Options: Description ways to run the command (you can change the function of the command). Options section is "-" character began.
c) Parameters: explain what commands affect (operations) it is (such as a file, a directory or some body text)
2. whoami command
1) function whoami command: Lists the currently logged-in user name (account) Linux system used.
3. who command
1) Function who command: Lists which users are currently working on the system.
2) the output of the who command: Displays all users currently logged on, and the current date and time.
4. date, cal, and the clear command with parameters and commands
1) The date command function: displays the current system date and time.
2) date command to set the time format time: date month, day, hour years.
For example: the time is set to order at 10:18 on December 24, 2013 is:
Extended (date 122410182013
hwclock -s -w synchronization hardware synchronization system)
3) function cal commands: display a calendar month.
4) Application cal command lists a calendar month of the year:
For example in August 2008 show calendar command: cal 8 2008
5) function clear command: clear the screen
6) clear screen shortcuts: ctrl + l
5. su command and passwd
1) Function su command: switching from the current user to another user of another specified.
2) su command to switch the user:
For example: a command to cut the root user: su -root
3) passwd command function: to modify the user (either a regular user, it can be the root user) password, view the status of the user's password and so on. useradd
4) use the passwd command to change the user's password:
For example: Modify dog ​​user password command: passwd dog
6. Get the help command
1) using the man command
  Example: The command su command to view the instructions for use is: man su
2) Use --help
  For example: the ls command to view the help command: ls --help
注意:man命令显示的内容是手册页(man就是manual的简写),一般man命令显示的帮助信息要更加丰富,它比命令的help选项多了命令的用法示例、命令的描述等内容。还有一个区别是man命令显示的内容来自于磁盘上的man手册页文件,如果删除了某个手册页文件时man就无法显示了,而命令的help选项是大部分命令本身内置的功能,只要系统上有这个命令,执行help选项就能够显示。

Guess you like

Origin www.cnblogs.com/lsf123456/p/11124541.html