Simple instructions for using Linux network commands
1. write command
Function description: send a message to linux users (online), and save it with ctrl+d
Usage: write+user name, then enter the content you want to send, ctrl+d to end.
2. wall command
Function description: write all, send broadcast information to all online users. including yourself
Usage: wall+ sent information
3. ping command
Function description: Test the connectivity of the network
Usage: ping option ip address
-c specifies the number of times to send
4. ifconfig command
Function description: view and set network card information
Usage: ifconfig eth0 192.168.8.250
5. mail command
Function description: View and send emails
Usage: mail+username
6. last command
Function description: List current and past user information logged into the system. You can query the login name, login terminal, login ip, login time and logout time. System restart will also be recorded, reboot
Usage: last
7. lastlog command
Function description: Check when a specific user last logged in
Usage: lastlog or lastlog -u 1000 (id+username can check user uid)
8. traceroute command
Function description: display the path between the data packet and the host
Usage: traceroute www.sina.com.cn
9. netstat command
Function description: display network related information
Usage: netstat [options]
options:
-t: TCP protocol
-u: UDP protocol
-l: monitor
-r: routing
-n: display IP address
-a: all
example:
netstat -tlun View the port the machine is listening on
netstat -an View all network connections of this machine
netstat -rn View the routing table of this machine
10. setup command
Function description: Configuring the network is simpler than manually modifying the configuration file, and it takes effect permanently
Only redhat series systems have this command
Usage: setup