Super convenient linux command manual

Source: Internet
Author: User
Author of the super convenient linux command manual/**: winsyk * Source: evil baboons [EST]; * fromchinaunix * if any reposted, please indicate the source * You are welcome to add, */NO classification PS1 command name usage and parameter function annotation corresponding to Chapter 1 file management # lsls-a lists all files in the current directory, including. implicit header

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
Usermod? 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? Group name g 501
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? Full name of qp software package
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? Full name of Uvh software package
Update the software package and display the process
54
Software Management
#
Rpm-ivh
Rpm? Full name of 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 a 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

Related Article

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.