1. View the routing table
Command: route-n; Netstat-r
Tracking Network address: Traceroute www.16 3.com
2. View a machine IP address and its corresponding domain name
Command: nslookup; Dig sina.com.cn; Dig sina.com.cn NS; Dig www.163.com + Trace
3. Query User Information
Command: Finger; W
4. List current system open files
Command: lsof-i: 22
5. View the process
Command: Ps-aux; Ps-qux|grep Nginx; Ps-ef |grep Nginx
6. Find the currently running process and list the process PID that matches the given criteria
Command: Pgrep nginx
7. Terminating a process
Command: kill-9 111
8. Kill all processes by program name
Command: Killall http
Adding static routes in a 9.windows environment
Command: Route add 192.168.1.0 Mask 255.255.255.0 192.168.2.3 (this command fails after reboot)
Route-p Add 192.168.1.0 mask 255.255.255.0 192.168.2.3 (write registry restart will not expire)
Registry Address Hkey_local_machsystem\currentcontrolset\services\tcpip\prameters\persistentroutes
Add static routes under 10.centos
Route add-net 192.168.1.0 netmask 255.255.255.0 GW 192.168.2.5 (reboot will fail)
Route Add-net is the network way to add routes, netmask is the subnet mask, GW next address.
Description 192.168.1.0/24 route through 192.168.2.5 out
Vi/etc/sysconfig/network-scripts/route-eth0
192.168.1.0/24 via 192.168.2.5 (restart will not expire after writing)
Various Linux small operations