Home > OS >  Commonly used Linux command
Commonly used Linux command

Time:09-24

To share some of my notes, commonly used Linux command, if useful, you'd better [applause.]
If it can be useful to my web link http://www.zyhyangliu.com there are more detailed content

1, shutdown restart command

Shutdown: shutdown the halt poweroff

Resume: reboot

2, help related command

Man look at common commands help document

- help can only view the built-in command

Info to view the help of a command for details information

Type, check to see if a command to the built-in command

3, the file directory class command

The directory with the PWD to view the current

CDS switch directory

Tree (L - F - d) show directory hierarchy, displayed in a book directory structure directory content

The mkdir (-p), create a directory by default can only create a layer, - p can be recursively create, that is, at the same time create multi-level directory

Ls check the files in the directory

Ls -l displays detailed file within the directory, you can also use ll

Ll - d displays detailed information directory itself

Cp (r - p - a - I \ cp) copy the file or directory, which can be used to rename files and directories

Rm to delete a file or directory, the -f mandatory delete, -r recursive delete

Mv moving files or directories that can be used to change name, generally can be used instead of the rm to use, to prevent mistaken delete

Touch to create a file

How many rows before head display file, -n can define specific lines

Tail show mountainous line, last - n define specific line number, f or tailf said always show

Vim/vi to edit a file or create a new file directly

Cat to view the file content

4, the user class command

Id to view the user book ever exist, check the user identity information

Whoami view the current production login user

Useradd to add a new user, -u specifies the UID, -s specifies whether the user should login, -m specify the home directory,

- g specified user group

Userdel delete users - r, together with the home directory delete

Usermod modify the user information, -s specify whether you need to login, modify the user - g group, belong to multiple groups, g - c plus related description

Passwd modify the user password, the default is to change the root password, passwd + user name + password

Su - user does not specify a user is the default switch switch to the root

5, disk type command

Df (h - I) check disk space, - h in human readable manner, according to the -i display inode information

LSBLK check disk space

The mount mount

Cancel the mount umount

The cat/proc/cpuinfo view CPU information

Lscpu view CPU information

The cat/proc/meminfo
memory information
The cat/proc/mounts to see mount information

W to check the load

Top view load

Uptime check load

6, the network related command

The cat/etc/sysconfig/network - scripts/ifcfg - eth (0/1) to check the network adapter configuration file information

Telnet + IP + ports to see whether smooth

Ping IP +/+ domain name to see whether the path unobstructed

Cat/etc/resolv. Conf to check the DNS configuration file

Systemctl restart network restart card

Systemctl stop closed network card

Systemctl start open network card

Ifdown/ifup + card name closed or open card

7, software installation related

(yum yum install software install + software)

Yum remove delete software

The RPM (- the ivh) install the software

RPM -e delete software

Yum provides view commands in the installation package

Yum list view can be installed packages

Yum repolist to check the number of packages can be installed

RPM - qa check is already installed package

RPM - ql what view is already installed package file

Yum clean all clear the cache

Today is first introduced to here, this is some basic commands, beginners need to acquire these commands, the subsequent will continue to update more content, please look! Welcome to visit my blog at http://www.zyhyangliu.com

CodePudding user response:

Shutdown and restart should not be reduced to commonly used commands, shutdown and restart command is not commonly used,

CodePudding user response:

Learning Linux for a long time, but the day-to-day work of the application or lack of, can't completely out of the Windows

CodePudding user response:

Whoa, too, is my neglect, should call basic commands

CodePudding user response:

Linux have to often get started operation can skilled operation

CodePudding user response:

Init 3
Init 5
Init 6
Init 0
The four bright command is very common

CodePudding user response:

Is very common, I write is not comprehensive, thank you!

CodePudding user response:

Reboot and shutdown how are commonly used command?

CodePudding user response:

refer to 7th floor weixin_43707346 response:
how reboot and shutdown is common commands?
neglect

CodePudding user response:

Linux commands use will be more, but still thank bloggers share, collection when forget to look at,

CodePudding user response:

The
refer to the original poster zyhyangl response:
to share some of my notes, commonly used Linux command, if useful, you'd better [applause.]
If it can be useful to my web link http://www.zyhyangliu.com there are more detailed content

1, shutdown restart command

Shutdown: shutdown the halt poweroff

Resume: reboot

2, help related command

Man look at common commands help document

- help can only view the built-in command

Info to view the help of a command for details information

Type, check to see if a command to the built-in command

3, the file directory class command

The directory with the PWD to view the current

CDS switch directory

Tree (L - F - d) show directory hierarchy, displayed in a book directory structure directory content

The mkdir (-p), create a directory by default can only create a layer, - p can be recursively create, that is, at the same time create multi-level directory

Ls check the files in the directory

Ls -l displays detailed file within the directory, you can also use ll

Ll - d displays detailed information directory itself

Cp (r - p - a - I \ cp) copy the file or directory, which can be used to rename files and directories

Rm to delete a file or directory, the -f mandatory delete, -r recursive delete

Mv moving files or directories that can be used to change name, generally can be used instead of the rm to use, to prevent mistaken delete

Touch to create a file

How many rows before head display file, -n can define specific lines

Tail show mountainous line, last - n define specific line number, f or tailf said always show

Vim/vi to edit a file or create a new file directly

Cat to view the file content

4, the user class command

Id to view the user book ever exist, check the user identity information

Whoami view the current production login user

Useradd to add a new user, -u specifies the UID, -s specifies whether the user should login, -m specify the home directory,

- g specified user group

Userdel delete users - r, together with the home directory delete

Usermod modify the user information, -s specify whether you need to login, modify the user - g group, belong to multiple groups, g - c plus related description

Passwd modify the user password, the default is to change the root password, passwd + user name + password

Su - user does not specify a user is the default switch switch to the root

5, disk type command

Df (h - I) check disk space, - h in human readable manner, according to the -i display inode information

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull