Ubuntu Common Terminal commands

Source: Internet
Author: User
Tags bz2 chmod ftp pack relative touch zip file permissions

Ubuntu Common Terminal commands

NO Classification PS1 command name usage and parameter function annotation

1 file Management # ls ls-a lists all files in the current directory, including hidden files with. headers

File Management # ls ls-l or LL lists the details of the files in the current directory

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

File Management # CD CD. Back to the top level of the current directory

File Management # CD CD-back to the last directory

File Management # CD CD ~ or CD back to the current user's host directory

File Management # CD CD ~ User name back to the specified user's host directory

2 File Management # mkdir mkdir directory name Create a directory

File Management # mkdir mkdir–p recursive to create some nested directories

File Management # rmdir rmdir empty directory name Delete an empty directory

3 File Management # RM RM FileName File name Delete one file or multiple files

File Management # RM RM-RF non-empty directory name recursive delete everything under a non-empty directory, do not let the lift-f

4 File Management # Cat Cat file name one screen view file contents

5 File Management # More, file name paging view file contents

6 file Management # Less less file name control paging to view the contents of files

7 File Management # grep grep character filename to see part of the file based on character matching

8 File Management # MV MV Channel/document/file/file move relative to the road under the file to the absolute path under

File Management # MV MV FileName New name renamed in current directory

9 File Management # CP CP/RD/file./move absolute path down the file to the current directory

10 file Management # Find found the road through the-name "string" Lookup in the scope of the path to match the string matching files and directories

11 File Management # LN ln source file Link name create a hard link to the current directory source file

Ln/home/test/usr/test1 to establish/home/test hard links under/usr

12 File Management # ln ln-s A b Create a symbolic link for the current directory

13 File Management # Touch Touch file1 file2 Create two empty files

14 Disk Management # DF DF is used to report the total capacity, usage, and remaining capacity of the file system.

15 Disk Management # du du-b/home View the current capacity of the/home directory (k) and the capacity of subdirectories (k).

16 Disk Management # FDISK FDISK-L View system partition information

17 Disk Management # FDISK FDISK/DEV/SDB partitions for a new SCSI hard drive

18 Disk Management # MKFS.EXT3 MKFS.EXT3/DEV/SDB1

Format the first primary partition for the first SCSI hard drive

Ext3 file System

MKFS.EXT2 mkfs.ext2/dev/sdb2 format into ext2 file system

19 Disk Management # Mount Mount-t file system type device path access path via

Disk Management # File system type

Iso9660 Optical Drive File system

VFAT FAT file System (Windows)

Mount Optical Drive # mount–t Iso9660/dev/cdrom/mnt/cdrom

Mount Fat # mount–t Vfat/dev/hda5/mnt/cdrom hangs the fifth logical partition of the first IDE

17 Disk Management # Umount/mnt/cdrom Uninstall/mnt/cdrom empty

18 File Permissions # chmod chmod u+s file for owner of file plus special permissions

chmod g+r file for a group of file plus Read permissions

chmod o+w file to add write permissions to other users of file

chmod a-x file for all users of file minus Execute permissions

chmod 765 file for the owner of the file is set to complete permissions, belong to the group set to read and write rights, other users have read and the right to mind

19 File Permissions # Chown chown root/home to change/home's owner to root

20 File Permissions # chgrp chgrp root/home To change/home's genus to root group

21 Print Management # Redhat-config-printer-tui into the installation printer interface

22 Print Management # LP Lp–d hptr file Print file to Hptr printer

23 Print Management # LPQ Lpq–p printer name View printer status

24 Print Management # LPRM LPRM–P Printer name a delete a print job inside a printer

25 Print Management # Disable disable–r "changing Kou kou" hptr Disable printer and prompt for reason

26 Print Management # Enable enable Hptr re-enable disabled

27 User Management # Useradd Useradd Create a new user

28 User Management # Groupadd Groupadd Group name to create a new group

29 User admin # passwd passwd user name creates password for user

30 User admin # passwd-d passwd-d username Delete user password can also log in

31 User Management # PASSWD-L passwd-l username Lock account Password

32 User Management # passwd-u passwd-u user name unlock account password

33 User Management # PASSWD-S passwd-s username Query account password

34 User Management # Usermod-l usermod-l new username old user name renamed to User

35 User admin # usermod-l usermod-l to lock user name lock User Login

36 User admin # usermod-u usermod–u unlock user name unlock user login

37 User Admin # usermod-u usermod–u 501 username change user uid

38 User admin # Userdel userdel–r username Delete User everything

39 User Management # Groupmod-n groupmod–n new username old username name Group renamed

40 User Management # GROUPMOD-G groupmod–g 501 Group name change Group GID

41 User Management # Groupdel Groupdel Group name should first delete the user deleted the group

42 User Admin # gpasswd-a gpasswd-a user name Group name to add user to group

43 User admin # ID ID user name check user information

44 Software Management # RPM-QA Rpm–qa | Less query has been installed RPM

45 Software Management # RPM–QA | grep ftp query Specifies rpm

46 Software Management # RPM-Q RPM-Q installed RPM package Check for installation

47 Software Management # RPM-Q telnet-server View Telnet Server pack

48 Software Management # RPM-QI RPM–QI package name view software description information

49 Software Management # RPM-QL RPM–QL Package Name Query package file list

50 Software Management # RPM-QF RPM–QF package name query for packages to which a file belongs

51 Software Management # RPM-QP RPM–QP Package full Name query for package information not installed

52 Software Management # RPM-E RPM–E package name Remove specific packages

53 Software Management # RPM-U RPM–UVH package full name upgrade package and show process

54 Software Management # RPM-IVH RPM–IVH Package full name install package and display process

55 Software Management # RPM-V RPM–V Package Name Verify package size, type, etc.

56 Software Management # TAR-C Create Package –x release Package-v Display command procedure –z represent compressed package

57 Software Management # TAR-CF TAR–CVF benet.tar/home/benet Pack/home/benet Directory

58 Software Management # TAR-CZF TAR–ZCVF BENET.TAR.GZ/MNT Package and compress the directory

59 Software Management # TAR–TF TAR–TF benet.tar See file list for uncompressed packages

60 Software Management # TAR–TZF TAR–TF benet.tar.gz Look at the file list for the ZIP package

61 Software Management # TAR–XF TAR–XF Benet.tar File Recovery for uncompressed packages

62 Software Management # TAR–ZXVF TAR–ZXVF benet.tar.gz Compression package file Decompression Recovery

63 Software Management # TAR-JXVF TAR–JXVF benet.tar.bz2

64 Software Management # diff diff file1 file2 > patch name. patch generate patch files for old and new files

65 Software Management # diff diff file1 File2 compare two file differences

66 Software Management # Patch Patch file patch name. Patch Patch

67 Software Management #./configure--prefix=/usr/local/Pre-compile configuration

68 Software Management # make compilation

69 Software Management # Make install install the compiled source pack

70 Boot Management # reboot Init 6 reboot Linux system

71 Boot Management # Halt Init 0 shutdown–h now shut down Linux system

72 Boot Management # RunLevel display system run level

73 Boot Management # Init [0123456] Change system run level, 7 kinds

74 Boot Management # chkconfig–-list [service name] View service status

75 Boot Management # Chkconfig–-level < run level > < service name > on|off|set setting up service startup status

76 Boot Management # chkconfig < service name > on|off|set setting up 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 Run program

79 Process Management # FG Put the background running process back to the front desk

80 Process Management # BG, move the foreground running process to the background

81 Process Management # Renice Renice +1 180 priority plus 1 for process 180th

82 Process Management # KILL kill PID Terminate a PID process

83 Process Management # at in 5pm + 3 days

/bin/ls specified three days after 5:00 execution/bin/ls

84 Process Management # Crontab CRONTAB-E to edit the automatic recurring task in VI form

85 Process Management # crontab Crontab-l View automatic recurring tasks

86 Process Management # crontab CRONTAB-R Delete automatic recurring task

87 Process Management # Crond Service crond Ubuntu Common Terminal command

NO Classification PS1 command name usage and parameter function annotation

1 file Management # ls ls-a lists all files in the current directory, including hidden files with. headers

File Management # ls ls-l or LL lists the details of the files in the current directory

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

File Management # CD CD. Back to the top level of the current directory

File Management # CD CD-back to the last directory

File Management # CD CD ~ or CD back to the current user's host directory

File Management # CD CD ~ User name back to the specified user's host directory

2 File Management # mkdir mkdir directory name Create a directory

File Management # mkdir mkdir–p recursive to create some nested directories

File Management # rmdir rmdir empty directory name Delete an empty directory

3 File Management # RM RM FileName File name Delete one file or multiple files

File Management # RM RM-RF non-empty directory name recursive delete everything under a non-empty directory, do not let the lift-f

4 File Management # Cat Cat file name one screen view file contents

5 File Management # More, file name paging view file contents

6 file Management # Less less file name control paging to view the contents of files

7 File Management # grep grep character filename to see part of the file based on character matching

8 File Management # MV MV Channel/document/file/file move relative to the road under the file to the absolute path under

File Management # MV MV FileName New name renamed in current directory

9 File Management # CP CP/RD/file./move absolute path down the file to the current directory

10 file Management # Find found the road through the-name "string" Lookup in the scope of the path to match the string matching files and directories

11 File Management # LN ln source file Link name create a hard link to the current directory source file

Ln/home/test/usr/test1 to establish/home/test hard links under/usr

12 File Management # ln ln-s A b Create a symbolic link for the current directory

13 File Management # Touch Touch file1 file2 Create two empty files

14 Disk Management # DF DF is used to report the total capacity, usage, and remaining capacity of the file system.

15 Disk Management # du du-b/home View the current capacity of the/home directory (k) and the capacity of subdirectories (k).

16 Disk Management # FDISK FDISK-L View system partition information

17 Disk Management # FDISK FDISK/DEV/SDB partitions for a new SCSI hard drive

18 Disk Management # MKFS.EXT3 MKFS.EXT3/DEV/SDB1

Format the first primary partition for the first SCSI hard drive

Ext3 file System

MKFS.EXT2 mkfs.ext2/dev/sdb2 format into ext2 file system

19 Disk Management # Mount Mount-t file system type device path access path via

Disk Management # File system type

Iso9660 Optical Drive File system

VFAT FAT file System (Windows)

Mount Optical Drive # mount–t Iso9660/dev/cdrom/mnt/cdrom

Mount Fat # mount–t Vfat/dev/hda5/mnt/cdrom hangs the fifth logical partition of the first IDE

17 Disk Management # Umount/mnt/cdrom Uninstall/mnt/cdrom empty

18 File Permissions # chmod chmod u+s file for owner of file plus special permissions

chmod g+r file for a group of file plus Read permissions

chmod o+w file to add write permissions to other users of file

chmod a-x file for all users of file minus Execute permissions

chmod 765 file for the owner of the file is set to complete permissions, belong to the group set to read and write rights, other users have read and the right to mind

19 File Permissions # Chown chown root/home to change/home's owner to root

20 File Permissions # chgrp chgrp root/home To change/home's genus to root group

21 Print Management # Redhat-config-printer-tui into the installation printer interface

22 Print Management # LP Lp–d hptr file Print file to Hptr printer

23 Print Management # LPQ Lpq–p printer name View printer status

24 Print Management # LPRM LPRM–P Printer name a delete a print job inside a printer

25 Print Management # Disable disable–r "changing Kou kou" hptr Disable printer and prompt for reason

26 Print Management # Enable enable Hptr re-enable disabled

27 User Management # Useradd Useradd Create a new user

28 User Management # Groupadd Groupadd Group name to create a new group

29 User admin # passwd passwd user name creates password for user

30 User admin # passwd-d passwd-d username Delete user password can also log in

31 User Management # PASSWD-L passwd-l username Lock account Password

32 User Management # passwd-u passwd-u user name unlock account password

33 User Management # PASSWD-S passwd-s username Query account password

34 User Management # Usermod-l usermod-l new username old user name renamed to User

35 User admin # usermod-l usermod-l to lock user name lock User Login

36 User admin # usermod-u usermod–u unlock user name unlock user login

37 User Admin # usermod-u usermod–u 501 username change user uid

38 User admin # Userdel userdel–r username Delete User everything

39 User Management # Groupmod-n groupmod–n new username old username name Group renamed

40 User Management # GROUPMOD-G groupmod–g 501 Group name change Group GID

41 User Management # Groupdel Groupdel Group name should first delete the user deleted the group

42 User Admin # gpasswd-a gpasswd-a user name Group name to add user to group

43 User admin # ID ID user name check user information

44 Software Management # RPM-QA Rpm–qa | Less query has been installed RPM

45 Software Management # RPM–QA | grep ftp query Specifies rpm

46 Software Management # RPM-Q RPM-Q installed RPM package Check for installation

47 Software Management # RPM-Q telnet-server View Telnet Server pack

48 Software Management # RPM-QI RPM–QI package name view software description information

49 Software Management # RPM-QL RPM–QL Package Name Query package file list

50 Software Management # RPM-QF RPM–QF package name query for packages to which a file belongs

51 Software Management # RPM-QP RPM–QP Package full Name query for package information not installed

52 Software Management # RPM-E RPM–E package name Remove specific packages

53 Software Management # RPM-U RPM–UVH package full name upgrade package and show process

54 Software Management # RPM-IVH RPM–IVH Package full name install package and display process

55 Software Management # RPM-V RPM–V Package Name Verify package size, type, etc.

56 Software Management # TAR-C Create Package –x release Package-v Display command procedure –z represent compressed package

57 Software Management # TAR-CF TAR–CVF benet.tar/home/benet Pack/home/benet Directory

58 Software Management # TAR-CZF TAR–ZCVF BENET.TAR.GZ/MNT Package and compress the directory

59 Software Management # TAR–TF TAR–TF benet.tar See file list for uncompressed packages

60 Software Management # TAR–TZF TAR–TF benet.tar.gz Look at the file list for the ZIP package

61 Software Management # TAR–XF TAR–XF Benet.tar File Recovery for uncompressed packages

62 Software Management # TAR–ZXVF TAR–ZXVF benet.tar.gz Compression package file Decompression Recovery

63 Software Management # TAR-JXVF TAR–JXVF benet.tar.bz2

64 Software Management # diff diff file1 file2 > patch name. patch generate patch files for old and new files

65 Software Management # diff diff file1 File2 compare two file differences

66 Software Management # Patch Patch file patch name. Patch Patch

67 Software Management #./configure--prefix=/usr/local/Pre-compile configuration

68 Software Management # make compilation

69 Software Management # Make install install the compiled source pack

70 Boot Management # reboot Init 6 reboot Linux system

71 Boot Management # Halt Init 0 shutdown–h now shut down Linux system

72 Boot Management # RunLevel display system run level

73 Boot Management # Init [0123456] Change system run level, 7 kinds

74 Boot Management # chkconfig–-list [service name] View service status

75 Boot Management # Chkconfig–-level < run level > < service name > on|off|set setting up service startup status

76 Boot Management # chkconfig < service name > on|off|set setting up 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 Run program

79 Process Management # FG Put the background running process back to the front desk

80 Process Management # BG, move the foreground running process to the background

81 Process Management # Renice Renice +1 180 priority plus 1 for process 180th

82 Process Management # KILL kill PID Terminate a PID process

83 Process Management # at in 5pm + 3 days

/bin/ls specified three days after 5:00 execution/bin/ls

84 Process Management # Crontab CRONTAB-E to edit the automatic recurring task in VI form

85 Process Management # crontab Crontab-l View automatic recurring tasks

86 Process Management # crontab CRONTAB-R Delete automatic recurring task

87 Process Management # Crond Service Crond

Start Automatic cycle now * * Service crond <start|stop|restart|status>

Start Automatic cycle now * * Service Crond < start | stop | reboot | status >

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.