Common ubuntu terminal commands

Source: Internet
Author: User

Common ubuntu terminal commands NO classification PS1 command name usage and Parameter Function annotation 1 file management # ls-a list all files in the current directory, including. hidden File Management in the header # ls-l or ll list detailed file information under the current directory file management # pwd view the absolute path of the current directory by file management # cd .. back to the upper-level directory file management of the current directory # cd-back to the last directory file management # cd ~ Or cd back to the current user's home directory file management # cd ~ User name back to specify the user's home directory 2 file management # mkdir directory name to create a directory file management # mkdir-p recursively create some nested directory file management # rmdir Rmdir empty directory name delete an empty directory 3 File Management # rm file name delete a file or multiple file management # rm-rf non-empty directory name recursively delete everything in a non-empty directory, not to mention-f 4 file management # cat file name 1 screen View File Content 5 File Management # more file name Page View File Content 6 file management # less file name controllable Page View File Content 7 file Management # grep character file name view part of the file content based on character matching 8 file management # Music Video path/file move files under the relative path to absolute path File Management # change the name of the mv file to the current directory. Name 9: File Management # cp/path/file. /move files under the absolute path to 10 files under the current directory # find path-name "string" to find files within the range where the path matches the string and 11 file management under the directory # ln ln Source File Link name create hard link ln/home/test/usr/test1 create hard link of/home/test under/usr 12 file management # ln Ln-s a B creates a symbolic link to a in the current directory B 13 file management # touch file1 file2 creates two empty files 14 disk management # df is used to report the total capacity of the file system, usage, remaining capacity. 15 disk management # du-B/home view the current/HOME directory capacity (k) and sub-directory capacity (k ). 16 disk management # fdisk-l view system partition information 17 disk management # fdisk/dev/sdb for a new SCSI hard disk for partition 18 disk management # mkfs. ext3 Mkfs. ext3/dev/sdb1 is the file system mkfs formatted as ext3 in the first primary partition of the first SCSI hard disk. ext2 Mkfs. ext2/dev/sdb2 format to ext2 File System 19 disk management # mount-t file system type device path access path disk management # file system type Iso9660 optical drive file system vfat File System (windows) mount the 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 permissions # chmod u + s file is the owner of the file plus special permissions chmod g + r file is file other users whose group has the read permission chmod o + w file and whose write permission chmod a-x file is the file, and whose execution permission chmod 765 file is the file owner. set to full permissions, set owner to read/write permission, other users have read and hold permissions 19 file permissions # chown root/home change/home owner to root user 20 file permissions # chgrp root/home change Group to root group 21 print management # redhat-config-printer-tui enter installation printer interface 22 print management # 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 print jobs in the printer 25 print management # disable Disable-r "changing has been stopped "HPtr disables the printer and prompts reason 26 print management # enable Enable HPtr re-enables disabled 27 user management # useradd Useradd creates a new user 28 user management # groupadd Groupadd group name create a new group 29 user management # passwd Passwd user name create password 30 user management # Passwd-d user name delete user password can also log on to 31 user management # Passwd-l Passwd -l user name lock account password 32 user management # Passwd-u user name unlock account password 33 user management # Passwd-S user name query account password 34 user management # Usermod- l Usermod-l new username old username changed to user name 35 user management # Usermod-L need to lock username lock User Login 36 user management # Usermod-U unlock username unlock user Login 37 user management # Usermod-u 501 username Change User UID 38 user management # Userdel-r username delete user all 39 user management # Groupmod-n New old user name is changed to group name 40 user management # Groupmod-g 501 Group Name Change Group GID 41 user management # groupdel Groupdel group name should be deleted first its users Delete Group 42 users management # gpasswd-a username group name Add users to group 43 user management # Id username query user information 44 software management # rpm-qa | less query installed RPM 45 software management # rpm-qa | grep ftp query specified RPM 46 software management # rpm-q installed RPM package check whether 47 software management is installed # rpm-q telnet -server View telnet server package 48 software management # rpm-qi package name View Software Description 49 software management # rpm-ql package name query the package file list 50 software management # rpm-qf software package name query Software Package 51 Where a file belongs # rpm-qp software package full name query uninstalled software package information 52 software management # rpm-e package name delete specific package 53 software management # rpm-U rpm-Uvh package full name upgrade package and display process 54 software management # rpm-ivh package full name installation package and display process 55 software management # rpm-V package name verification package size, type, etc. 56 software management # tar-c create package-x release package-v display command process-z represents compressed package 57 software management # tar-cf tar-cvf benet.tar/home/benet /home/benet directory packaging 58 software management # tar-czf tar-zcvf benet.tar.gz/mnt package the Directory and compress 59 software management # tar-tf benet.tar to view non-compressed files list 60 software management # tar-tzf tar-tf benet.tar.gz view compressed package file list 61 software management # tar-xf benet.tar file recovery 62 software management # tar-zxvf unzip the files in the tar-zxvf benet.tar.gz package and restore them to 63 software management # tar-jxvf benet.tar.bz2 64 software management # diff file1 file2> patch name. patch 65 software management for new and old files # diff file1 file2 comparison of two files 66 software management # Patch file patch name. patch 67 software management #. /configure -- prefix =/usr/local/configure 68 software management before compilation # make compilation 69 software management # make install compiled source code package 70 start management # reboot Init 6 restart LINUX System 71 start management # Halt Init 0 Shutdown-h now disable LINUX system 72 start management # runlevel display system running level 73 start management # Init [0123456] change system running level, 7 kinds of 74 startup management # Chkconfig -- list [service name] view service status 75 startup management # Chkconfig -- level <running level> <service name> on | off | set the Service's startup status 76 startup management # Chkconfig <service name> on | off | set non-independent service startup status 77 Process Management # Top dynamic Ps-aux static process tree pstree view system process 78 Process Management # program name & background running program 79 Process Management # fg transfers background running processes back to foreground 80 Process Management # bg transfers foreground running processes to Background 81 Process Management # renice Renice + 1 180 180 process priority plus 1 82 Process Management # kill Kill PID terminate a PID process 83 Process Management # at 5 + 3 days/bin/ls specify three days after execution/ bin/ls 84 Process Management # crontab Crontab-e use VI to edit Automatic periodic task 85 Process Management # crontab Crontab-l view Automatic periodic task 86 Process Management # crontab Crontab-r delete Automatic periodic task 87 Process Management # crond Service crond <start | stop | restart | status> start automatic cycle now ** Service crond <start | stop | restart | status>

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.