Ubunt Terminal commands

Source: Internet
Author: User
Tags set set

Ubuntu Common Terminal commands


NO Classification PS1 command name usage and parameter function annotation

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

File Management # ls ls-l or ll lists the files in the current directory for more information

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

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

File Management # CD CD-back to the same 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 file name Delete a file or multiple files

File Management # RM RM-RF non-empty directory name recursively 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 + more file Names Page view the contents of the files

6 file Management # Less file name controllable paging view contents

7 File Management # grep grep character file name according to character matching to view the contents of the file part

8 File Management # MV MV Path/File/warp/file movement relative to the path of the file to the absolute path through

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

9 File Management # CP CP/Road Warp/file./move absolute path through the file into the current directory

10 File Management # Find find road via-name "string" finds paths in the range of files and directories that meet string matches

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

Ln/home/test/usr/test1 build/home/test hard link in/usr

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

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/home directory capacity (k) and subdirectory capacity (k).

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

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

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 formatted as ext2 file system

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

Disk Management # File system types

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 to hang 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 file owner plus special permissions

chmod g+r file for file group plus Read permission

chmod o+w file adds write permission to other users of file

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

chmod 765 file is the owner of the file is set to full permissions, the group is set to read and write rights, other users have read and hold the Authority

19 File Permissions # chown Chown root/home Change the owner of/home to the root user

20 File Permissions # chgrp chgrp root/home Change the home/home group to the root group

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

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

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

24 Print Management # LPRM LPRM–P printer name a delete print jobs inside the printer

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

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 create a new group

29 User Management # passwd passwd user name create password for user

30 User Management # passwd-d passwd-d user name Delete user password can also login

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 Inquiry account password

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

35 User Management # Usermod-l usermod-l to lock 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 user name for group renaming

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

41 User Management # Groupdel Groupdel Group name should first delete its user remove group

42 User Management # gpasswd-a gpasswd-a user name Group name increase user to group

43 User Management # ID ID user name check user information

44 Software Management # RPM-QA Rpm–qa | Less query 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 package

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 the package to which a file belongs

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

52 Software Management # RPM-E RPM–E Package name remove a specific package

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 show process

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

56 Software Management # TAR-C Create Package –x release Package-V Show Command procedure –z represents a compressed package

57 Software Management # TAR-CF TAR–CVF benet.tar/home/benet Packaging the/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 the file list of non-zipped packages

60 Software Management # TAR–TZF TAR–TF benet.tar.gz See the file list of compressed packages

61 Software Management # TAR–XF TAR–XF Benet.tar File Recovery for non-zipped 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 file for old and new files

65 Software Management # diff diff file1 File2 Compare the differences between two files

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

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

68 Software Management # make compilation

69 Software Management # make install installs the compiled source package

70 Startup Management # reboot Init 6 Restart Linux system

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

72 Start Management # RunLevel display system run level

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

74 Start Management # chkconfig–-list [service name] View the status of the service

75 Start Management # Chkconfig–-level < run level > < service name > On|off|set Set the startup status of the service

76 Start Management # chkconfig < service name > On|off|set set non-independent service boot status

77 Process Management # Top dynamic ps-aux static process Tree Pstree View System process

78 Process Management # program name & Background Run program

79 Process Management # FG back the process running in the background to the foreground

80 Process Management # BG put the foreground running process into the background

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

82 Process Management # KILL kill PID terminates a PID process

83 Process Management # at @ 5pm + 3 days

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

84 Process Management # crontab CRONTAB-E editing automatic recurring tasks in the form of VI

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|stop|restart|status>

Start Auto Cycle now * * Service Crond < start | stop | restart | status >

Ubunt Terminal 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.