UBUNTU one-sentence skills-getting started with Linux (for beginners)

Source: Internet
Author: User
Tags file type file

UBUNTU one-sentence skills-getting started with Linux (for beginners) view the installation content of software xxx dpkg-L xxx find the software apt-cache search Regular Expression find which package dpkg-S filename apt-file search filename query software xxx depends on which packages apt-cache depends xxx queries which packages of the software xxx depend on apt-cache rdepends xxx to add a CD source sudo apt-cdrom add system upgrade sudo apt-get update sudo apt-get upgrade sudo apt-get dist -upgrade -------------------------------------------------------------------------------- automatic processing of hware is missing during compilation. sudo auto-apt Run. /configure: view the temporary storage directory of the downloaded package when installing the software. ls/var/cache/apt/archives: Back up the list of all packages installed in the current system. dpkg -- get-selections | grep-v deinstall> ~ /Somefile restore all packages from the list file of the preceding backup installation package dpkg -- set-selections clear old software cache sudo apt-get autoclean clear all software caches sudo apt-get clean Delete System no longer used isolated software sudo apt-get autoremove kernel view kernel uname-a view ubuntu version cat/etc/issue view kernel loaded module lsmod view PCI device lspci view Nic status sudo ethtool eth0 view USB device lausb view cpu information vat/proc/cpuinfo view current hardware information Lshw ← view hard disk partition sudo fdisk-l view IDE Hard Disk information sudo hdparm-I/dev/hda view sata hard Disk information sudo hdparm-I/dev/sda or sudo apt-get install blktool sudo blktool dev/sda id viewing hard disk is better than space df-hdf-H viewing directory space occupied du-hs directory the name of the USB flash drive cannot be detached from syncfuser-km/media/usbdisk to view the current memory usage free-l memory to view the current process ps-A to kill A process (that is, the first column in ps-). number or killall process name) force a process to be killed (when the above method fails) kill-9 process number or killall-9 process name view the real-time status of the current process top view the file opened by the process lsof-p configure ADSLsudo pppoeconf ADSL Manual dialing sudo pon dsl-provider to activate ADSLsudo/ etc/ppp/pppoe_on_boot disconnect ADSLsudo poff view dialing log sudo plog view NIC address atping IP address view current IP address sudo ifconfig eth0 | awk '/inet addr/{split ($2, x ,":"); print x [2]} 'view the IP address w3m-no-cookie-dump ip.loveroot.com | grep-o' [0-9] \ {1, 3 \}\. [0-9] \ {1, 3 \}\. [0-9] \ {1, 3 \}\. [0-9] \ {1, 3: 80 Tib view the physical address of the current Nic sudo arp-a | awk '{print $4}' sudo ifconfig eth0 | head-1 | awk '{print $5}' immediately enable the network support nat sudo echo 1>/proc/sys/net/ipv4/ip_forwardsudo iptables-t nat-I POSTROUTING-j MASQUERADE to view route information netstat-rnsudo route-n manually add and delete a route sudo route add-net 192.168.0.0netmask 255.255.255.0 gw 255.route del-net 192.168.0.0netmask 255.255.255.0 gw 172.16.0.1 how to modify the nic mac address sudo ifconfig eth0 down # disable sudo ifconfig eth0 hw ether 00: AA: BB: CC: DD: EE # and then change the address sudo ifconfig eth0 up # then start the NIC configure Add a service sudo update-rc.d service name defaults 99 delete a service sudo update-rc.d service name remove temporarily restart a service/etc/init. d/service name restart temporarily closes a service/etc/init. d/service name stop configuration default Java use which sudo update-alternatives -- config java modify user information sudo chfn userid to apt set proxy export http_proxy = http://xx.xx.xx.xx: xxx modify system logon information sudo vim/etc/motd convert the file name from GBK to UTF8sudo apt-get install convmvconvmv-r-f cp936-t utf8 -- notest -- nosmart * to quickly find a file whereis filenamefind directory-name file name View file type file filename displays the last 6 lines of the xxx file tail-n 6 xxx

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.