View Release version
Cat/etc/redhat-releaselsb_release-a
Turn off the graphical interface
Init 3init5vi/etc/inittab
Configuring the Yum Source
Cd/etc/yum.repos.dll
Configure the Aliyun yum Source: Http://mirrors.aliyun.com/help/centos
Configure DNS
Vi/etc/resolv.confservice Network Restart
Configure the Network
Vi/etc/sysconfig/network-scripts/ifcfg-eth0service Network Restart
File compression and decompression tar.gz view tar.gz included files
TAR-TVF filename.tar.gz
Unzip to tar format
Gzip-d filename.tar.gz
Unzip to a file or directory
Tar xvf filename.tar.gz-c/usr/file
Compress files or directories as tar.gz
Tar cvfz test.tar.gz file1 file2
Tar view files included in tar
TAR-TVF Myfile.tar
Unzip to a file or directory
Tar xvf filename.tar-c/usr/file
Compress to tar.gz
Gzip Filename.tar
Compress a file or directory as tar
Tar cvf test.tar file1 file2
Zip to view the files contained in the zip
Unzip-l Filename.zip
Unzip the zip file or directory
Unzip filename.zip-d/usr/dile
Compress files or directories as zip
Zip-r test.zip file1 file2 dir1
View process and Port view service process
Ps-ef |grep Tomcat
viewing process ports
Netstat-anp|grep 23216
View Port Process
Lsof-i:80netstat-lnp|grep 80
Close process
Kill–9 23216
Switch User root switch to normal user
[email protected]/]# su username
Normal user switch root, enter the root password
[email protected]/]$ su
Linux Common commands and tricks