1. General Command: 1 date: printorsetthesystemdateandtime2stty-a: can view or print control characters (Ctrl-C, Ctrl-D, Ctr
I. general commands:1. date: print or set the system date and time 2. stty-a: You can view or print control characters (Ctrl-C, Ctrl-D, Ctrl-Z, etc.) 3. passwd: print or set the system date and time (view with passwd-h) 4. logout and login: shell logon and logout command 5. pwd: print or set the system date and time 6. more, less, head tail: displays or partially displays the file content. 7. lp/lpstat/cancel, lpr/lpq/lprm: print the file. 8. change file permissions: chmod u + x... 9. delete non-empty directory: rm-fr dir 10. copy Directory: cp-R dir
II. common ubuntu commands:1. dpkg: package manager for Debian * installation: dpkg-I package * uninstall: dpkg-r package * uninstall and delete the configuration file: dpkg-P | -- purge package * If a package is installed. Dependent on some databases. You can # apt-get install somelib... * check the package installation content: dpkg-L package * In addition, dpkg also has dselect and aptitude frontend.2. apt * installation: apt-get install packs * apt-get update: update source * apt-get upgrade: upgrade the system. * Apt-get dist-upgrade: smart upgrade. Install the new software package and delete the discarded software package * apt-get-f install:-f = -- fix broken to fix the dependency * apt-get autoremove: automatically delete useless software * apt-get remove packages: delete software * apt-get remove package -- purge delete package and clear configuration file * clear the residual configuration file of the Delete package: dpkg-l | grep ^ rc | awk '{print $2}' | tr ["/n"] [""] | sudo xargs dpkg-P * temporary storage directory: /var/cache/apt/archives * clear this directory: apt-get clean * clear the old software cache of this directory: apt-get autoclean * query some dependent packages of the software: apt-cache depends some * query which packages depend on the software some: apt-get rdepends some * search software: apt-cache search name | regexp * view the compilation dependency library of a software: apt-cache showsrc packagename | grep Build-Depends * download the source code of the software: apt-get source packagename (note: sources. list should contain deb-src source) * Install the package source code and its compiling environment: apt-get build-dep packagename (with deb-src source) * How to add a local CD to the installation source list: apt-cdrom add
3. System Command:* View kernel version: uname-a * view ubuntu version: cat/etc/issue * view NIC status: ethtool eth0 * View Memory, cpu information: cat/proc/meminfo; cat/proc/cpuinfo (there are many system information under/proc) * print the usage of the file system space: df-h * view the hard disk partition: fdisk-l * production depends on the file size: du-h filename; * view the directory size: du-hs dirname; du-h dirname is to view the size of all files in the directory * View memory usage: free-m |-g |-k * View process: ps-e or ps-aux --> Display user * kill process: kill pid * force kill: killall-9 processname4. network related: * configure ADSL: sudo pppoeconf * ADSL manual dialing: sudo pon dsl-provider * activate ADSL: sudo/etc/ppp/pppoe_on_boot * disconnect ADSL: sudo poff * query Nic address based on IP address: arping ip address * Local network information (including IP address): ifconfig | ifconfig eth0 * View route information: netstat-r * disable Nic: sudo ifconfig eth0 down * enable Nic: sudo ifconfig eth0 up * add a service: sudo update-rc.d service name defaults 99 * remove a service: sudo update-rc.d service name remove * temporarily restart a service: /etc/init. d/service name restart * temporarily close a service:/etc/init. d/service name stop * temporarily start a service:/etc/init. d/service name start * the console displays Chinese: sudo apt-get install zhcon * to find a file: whereis filename or find Directory-name file name * transfer the file scp-rp/path/filename through ssh
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