Ubuntu skills Summary

Source: Internet
Author: User
Installation View Software xxx installation content dpkg-Lxxx search software apt-cachesearch Regular Expression find which package the file belongs dpkg-Sfilenameapt-filesearchfilename query software xxx depends on which packages apt-cachedependsxxx query software xxx is what the package depends on apt-cacherdependsxxx and adds a CD source sudoapt-cdromadd system to upgrade su


Install
View the installation content of software xxx
Dpkg-L xxx
Search software
Apt-cache search Regular Expression
Find the package of the file
Dpkg-S filenameapt-file search filename
Queries which packages the software xxx depends on
Apt-cache depends xxx
Queries which packages depend on the software xxx
Apt-cache rdepends xxx
Add a CD Source
Sudo apt-cdrom add
System Upgrade
Sudo apt-get updatesudo apt-get upgradesudo apt-get dist-upgrade
Clear the residual configuration file of the deleted package.
Dpkg-l | grep ^ rc | awk '{print $2}' | tr ["\ n"] [""] | sudo xargs dpkg-P-
Automatic Processing of H files is missing during compilation
Sudo auto-apt run./configure
View the temporary directory for storing downloaded packages during software installation
Ls/var/cache/apt/archives
How to modify the MAC address of a NIC
Sudo ifconfig eth0 down # disable the NIC sudo ifconfig eth0 hw ether 00: AA: BB: CC: DD: EE # change the address sudo ifconfig eth0 up # then start the NIC
Count the number of current IP connections
Netstat-na | grep ESTABLISHED | awk '{print $5}' | awk-F: '{print $1}' | sort | uniq-c | sort-r-nnetstat-na | grep SYN | awk '{print $5}' | awk-F: '{print $1}' | sort | uniq-c | sort-r-n
Count the IP addresses of up to 20000 IP packets in the current 100 IP Packets
Tcpdump-tnn-c 20000-I eth0 | awk-F ". "'{print $1 ". "$2 ". "$3 ". "$4} '| sort | uniq-c | sort-nr | awk' $1> 1000'
Mask IPV6
Echo "blacklist ipv6" | sudo tee/etc/modprobe. d/blacklist-ipv6
Service
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 close a service
/Etc/init. d/service name stop
Start a service temporarily
/Etc/init. d/service name start
Set
Configure which Java is used by default
Sudo update-alternatives -- config java
Modify user information
Sudo chfn userid
Set proxy for apt
Export http_proxy = http://xx.xx.xx.xx: xxx
Modify system logon information
Sudo vim/etc/motd
Chinese
Convert the file name from GBK to UTF8
Sudo apt-get install convmvconvmv-r-f cp936-t utf8 -- notest -- nosmart *

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.