Linux Common basic commands

Source: Internet
Author: User
Tags time and date

Linux Command encyclopedia chm document Download

1. Disk Management

CD [Destination directory]     # switch Directories
    DF #显示磁盘情况
    du [Options] [file] #显示目录或文件的大小
LS #列出当前目录内容
mkdir [directory name] #创建目录
PWD #显示当前工作目录
rmdir [catalogue] #删除目录
Stat [file or directory] #显示inode (creator of file, date of creation of file, size of file)

2. System Management

Date                # Displays or sets the system time and date
    Exit #退出当前的shell
Halt #关闭Linux系统
ID #显示用户的ID, and the ID of the owning group
Kill [Information number] [process ID] #杀死进程, such as Kill-9 1896
PS [-option] #显示进程, such as PS aux
Reboot #重启
shutdown [options] [TIME] #关闭或者重启系统, such as Shutdown-h 11:50
Su [user account] #变更用户身份
sudo [-u < user;] [instruction] #以其他身份来执行指令, default to root
Uname
Who #显示当前登入系统的用户信息
WhoAmI #显示当前用户名称
whois [account name] #查找并显示用户信息

3. File Management

diff [File 1] [file 2]        # compare two files differently
file [file] #辨识文件类型
Find [Catalog]-name test #查找名字为test的文件或目录
MV [source file or directory] [destination file or directory] #移动或或重命名文件
RM [Options] [file or directory] #删除文件或目录
Touch [file name] #创建文件
Whereis [contents] [File] #查找文件
which [file] #查找文件
Cat [file] #显示文件内容
chmod [Options] [permissions] [files or directories] #变更文件或目录权限
chown [Options] [user] [file or directory] #变更文件或目录的拥有者或所属群组
CMP [Options] [file 1] [file 2] #比较两个文件是否有差异
CP [Options] [source file] [destination file] #复制文件或目录

4. Backup compression

gunzip [Options] [file] [contents]  #解压被gzip压缩的文件
gzip [options] [file] [contents] #把目录压缩成gz文件
tar [options] [file] [contents] #解压tar文件到目录
uzip [Options] [file] [contents] #解压zip文件到目录
Zip [options] [Files] [contents] #把目录压缩成zip文件

Linux Common basic commands

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.