Super convenient linux Command Manual

Source: Internet
Author: User

Super convenient linux Command Manual
/*
* Topic Author: winsyk
* Source: Evil baboons [EST];
* From chinaunix
* If any reprint is available, indicate the source.
* You are welcome to add,
*/
NO
Category
PS1
Command name
Usage and Parameters
Function Annotation
Corresponding chapter
1
File Management
#
Ls
Ls-
List all files in the current directory, including hidden files with A. Header

File Management
#
Ls
Ls-l Or ll
List details of files in the current directory

File Management
#
Pwd
Pwd
View the absolute path of the current directory

File Management
#
Cd
Cd ..
Back to the upper-level directory of the current directory

File Management
#
Cd
Cd-
Go back to the last directory

File Management
#
Cd
Cd ~ Or cd
Return to the current user's home directory

File Management
#
Cd
Cd ~ User Name
Returns the Home Directory of the specified user.
2
File Management
#
Mkdir
Mkdir directory name
Create a directory

File Management
#
Mkdir
Mkdir-p
Recursively create some nested Directories

File Management
#
Rmdir
Rmdir empty directory name
Delete an empty directory
3
File Management
#
Rm
Rm file name
Delete one or more files

File Management
#
Rm
Rm-rf non-empty directory name
Recursively delete everything in a non-empty directory without the mention-f
4
File Management
#
Cat
Cat file name
View File Content on one screen
5
File Management
#
More
More file name
View File Content by PAGE
6
File Management
#
Less
Less file name
View File Content by PAGE
7
File Management
#
Grep
Grep character file name
View part of the file based on character matching
8
File Management
#
Mv
Mv path/file/path/File
Move files under the relative path to the absolute path

File Management
#
Mv
New mv file name
Rename the name under the current directory
9
File Management
#
Cp
Cp/path/file ./
Move files under the absolute path to the current directory
10
File Management
#
Find
Find path-name "string"
Find the files and directories that match strings within the scope of the path.
11
File Management
#
Ln
Ln Source File Link name
Create a hard link to the source file of the current directory

Ln/home/test/usr/test1
Create a hard link for/home/test under/usr

12
File Management
#
Ln
Ln-s a B
Create a symbolic link B under the current directory
13
File Management
#
Touch
Touch file1 file2
Create two empty files
14
Disk Management
#
Df
Df
Used to report the total capacity, usage, and remaining capacity of the file system.
15
Disk Management
#
Du
Du-B/home
View the current/HOME directory capacity (k) and sub-directory capacity (k ).
16
Disk Management
#
Fdisk
Fdisk-l
View system partition information
17
Disk Management
#
Fdisk
Fdisk/dev/sdb
Partition a new SCSI hard disk.
18
Disk Management
#
Mkfs. ext3
Mkfs. ext3/dev/sdb1

Format the first primary partition of the first SCSI hard disk
Ext3 File System

 

Mkfs. ext2
Mkfs. ext2/dev/sdb2
Format to ext2 File System
19
Disk Management
#
Mount
Mount-t file system type device path access path

Disk Management
#

File System Type

 


Iso9660
Optical Drive File System

 


Vfat
Fat file system (windows)

Attach Optical Drive
#
Mount-t iso9660/dev/cdrom/mnt/cdrom


Mount FAT
#
Mount-t vfat/dev/hda5/mnt/cdrom
Mount the fifth logical partition of the first ide
17
Disk Management
#
Umount/mnt/cdrom
Unmount/mnt/cdrom is empty
18
File Permission
#
Chmod
Chmod u + s file
Add special permissions to the file owner

 


Chmod g + r file
Add read permission to the file group

 


Chmod o + w file
Add write permission to other users of file

 


Chmod a-x file
The execution permission is subtracted from all users of the file.

Chmod 765 The owner of file is set to full permission, and the owner group is set to read/write permission. Other users have read and execute permissions.
19
File Permission
#
Chown
Chown root/home
Change/home owner to root user
20
File Permission
#
Chgrp
Chgrp root/home
Change/home group to root group
21
Print Management
#
Redhat-config-printer-tui
Enter the printer installation Interface
22
Print Management
#
Lp
Lp-d hptr file
Print the file to the hptr printer.
23
Print Management
#
Lpq
Lpq-P printer name
View the printer status
24
Print Management
#
Lprm
Lprm-P printer name
Delete print jobs in a printer
25
Print Management
#
Disable
Disable-r "changing paper" HPtr
Disable the printer and prompt the cause
26
Print Management
#
Enable
Enable HPtr
Enable disabled
27
User Management
#
Useradd
Useradd
Create a new user
28
User Management
#
Groupadd
Groupadd group name
Create a new group
29
User Management
#
Passwd
Passwd User Name
Create a password for the user
30
User Management
#
Passwd-d
Passwd-d User Name
You can also log on by deleting the user password.
31
User Management
#
Passwd-l
Passwd-l User Name
Lock account password
32
User Management
#
Passwd-u
Passwd-u User Name
Unlock account password
33
User Management
#
Passwd-S
Passwd-S User Name
Query account password
34
User Management
#
Usermod-l
Usermod-l old Username
Rename a user
35
User Management
#
Usermod-L
Usermod-L to lock the user name
Lock User Login
36
User Management
#
Usermod-U
Usermod-U unlock User Name
Unlock User Login
37
User Management
#
Usermod-u
User Mod-u 501 User Name
Change User UID
38
User Management
#
Userdel
Userdel-r user name
Delete user everything
39
User Management
#
Groupmod-n
Groupmod-n new username old Username
Rename a group
40
User Management
#
Groupmod-g
Groupmod-g 501 group name
Change Group GID
41
User Management
#
Groupdel
Users whose Groupdel group name should be deleted first
Delete Group
42
User Management
#
Gpasswd-
Gpasswd-a username group name
Add a user to a group
43
User Management
#
Id
Id Username
Query user information
44
Software management
#
Rpm-qa
Rpm-qa | less
Query installed RPMs
45
Software management
#

Rpm-qa | grep ftp
Query the specified RPM
46
Software management
#
Rpm-q
Rpm-q installed RPM package
Check for Installation
47
Software management
#

Rpm-q telnet-server
View the telnet server package
48
Software management
#
Rpm-qi
Rpm-qi package name
View the Software Description
49
Software management
#
Rpm-ql
Rpm-ql package name
Query the file list of a software package
50
Software management
#
Rpm-qf
Rpm-qf package name
Queries the software package to which a file belongs.
51
Software management
#
Rpm-qp
Rpm-qp package full name
Query Information about uninstalled software packages
52
Software management
#
Rpm-e
Rpm-e package name
Delete a specific software package
53
Software management
#
Rpm-U
Rpm-Uvh full name
Update the software package and display the process
54
Software management
#
Rpm-ivh
Full name of rpm-ivh Software Package
Install the software package and display the process
55
Software management
#
Rpm-V
Rpm-V package name
Verify the package size and type.
56
Software management
#
Tar
-C create package-x release package-v display command process-z represents the compressed package
57
Software management
#
Tar-cf
Tar-cvf benet.tar/home/benet
Package the/home/benet directory
58
Software management
#
Tar-czf
Tar-zcvf benet.tar.gz/mnt
Package and compress Directories
59
Software management
#
Tar-tf
Tar-tf benet.tar
View the list of non-compressed files
60
Software management
#
Tar-tzf
Tar-tf benet.tar.gz
View the file list of the compressed package
61
Software management
#
Tar-xf
Tar-xf benet.tar
Restore non-compressed files
62
Software management
#
Tar-zxvf
Tar-zxvf benet.tar.gz
Decompress and restore the compressed file
63
Software management
#
Tar-jxvf
Tar-jxvf benet.tar.bz2

64
Software management
#
Diff
Diff file1 file2> patch name. patch
Generate patch files for new and old files
65
Software management
#
Diff
Diff file1 file2
Compare the differences between the two files
66
Software management
#
Patch
Patch file patch name. Patch
Patch
67
Software management
#
./Configure -- prefix =/usr/local/
Pre-compilation Configuration
68
Software management
#
Make
Compile
69
Software management
#
Make install
Install the compiled source code package
70
Start Management
#
Reboot
Init 6
Restart LINUX
71
Start Management
#
Halt
Init 0
Shutdown-h now
Disable LINUX
72
Start Management
#
Runlevel

Display System running level
73
Start Management
#
Init [0123456]

Change the system running level, 7 types
74
Start Management
#
Chkconfig -- list [service name]
View service status
75
Start Management
#
Chkconfig -- level on | off | set
Set the service startup status
76
Start Management
#
Chkconfig on | off | set
Set the non-independent service startup status
77
Process Management
#
Top dynamic
Ps-aux static
Process tree pstree
View System Processes
78
Process Management
#
Program name &
Background running program

79
Process Management
#
Fg
Run the backend

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.