(1) Write
The write command is used to send messages to the specified user , ctrl+d save ends , and the path is/usr/bin/write, in the syntax format:
Write [user name]
Note: Can only be sent to online users .
Example: New WS user, root remote sends hello information to WS remote end.
Root side:
Write Wshello
WS-Side:
[[Email protected] ~] $Message from [e-mail protected] on pts/1: ... Helloeof
Where EOF indicates the end.
(2) Wall
The Wall command is used to send broadcast messages, the English original is writeall, where the path is/usr/bin/wall, and its syntax is:
Wall [message]
Example: Send a hello message to all online users at the root remote end:
Root side:
Wall Hello[[email protected] cdrom] #Broadcast message from [email protected] (pts/1) (Fri Jan 2 (in):Hello
WS-Side:
[[Email protected] ~] $Broadcast message from [email protected] (pts/1) (Fri Jan 2 (in):Hello
(3) Ping
The ping command is used to test network connectivity , where the path is/bin/ping, in the syntax format:
Ping option IP Address
Where-c option specifies the number of times to send
For example: Test the loopback address 127.0.0.1, set the number of times to 3:
[Email protected] cdrom]#Ping-C3 127.0.0.1PING127.0.0.1(127.0.0.1) About( -) bytes of data. -Bytes from127.0.0.1: icmp_seq=1Ttl= - Time=0.274Ms -Bytes from127.0.0.1: icmp_seq=2Ttl= - Time=0.072Ms -Bytes from127.0.0.1: icmp_seq=3Ttl= - Time=0.070Ms---127.0.0.1 PingStatistics---3Packets Transmitted,3Received0% packet loss, Time1999msrtt min/avg/max/mdev =0.070/0.138/0.274/0.096Ms
(4) Ifconfig
The ifconfig command is used to view and set the network card information, the English original intent is interface configure, where the path is/sbin/ifconfig, the syntax format is:
Ifconfig Network card IP address
Note: Ifconfig only briefly sets the IP address, and the next time the system restarts, the configuration is eliminated .
(5) Mail
The Mail command is used to view and send e-mail messages, characterized by the user not being able to send them online , where the path is/bin/mail, with the syntax in the following format:
Mail [user name]
Example: Root remote end sending mail to WS remote
Root Remote side:
[[Email protected] cdrom]# mail Wssubject:hellohello I am wseot[[email protected] cdrom]#
WS Remote End:
[[Email protected] ~]$ mailheirloom Mail version12.4 7/ in/ ,. Type? forHelp ."/var/spool/mail/ws":1Message1New>n1Root Fri Jan2 Geneva: - -/606 "Hello"&
Enter 1 to view the message:
&1Message1: From [email protected] Fri Jan2 Geneva: -: - -Return-path: <[email protected]>X-original-to:wsdelivered-to: [Email Protected]date:fri, GenevaJan - Geneva: -: ++0800to : [Email protected]subject:hellouser-agent:heirloom MAILX12.4 7/ in/ ,Content-type:text/plain; charset=us-asciifrom: [email protected] (root) status:r hello i am ws&
(6) Last
The last command lists user information that is currently logged into the system, with a path of/usr/bin/last, in the syntax format:
Last
Cases:
[Email protected] cdrom]# Lastws pts/0 110.13.4.109Fri Jan2 Geneva: $Still loggedinchws pts/0 110.13.4.109Fri Jan2 Geneva: About-Geneva: $(xx:xx) WS pts/0 110.13.4.109Thu Jan1 A: --xx:Geneva( on:Geneva) root pts/1 110.13.4.109Thu Jan1 -: -Still loggedinchRoot pts/0 110.13.4.109Thu Jan1 -: -- -: the( Geneva: One) root tty1 Thu Jan1 -: $Still loggedinchReboot system Boot2.6. +-431. el6.i Thu Jan1 -: *-Geneva: A( the: -) root pts/0 110.13.4.109Thu Jan1 -: +-Crash (xx:Wuyi) root tty1 Thu Jan1 -: A-Crash (xx: Wu) reboot system boot2.6. +-431. el6.i Thu Jan1 -: --Geneva: A(Ten: +) root pts/0 110.13.4.236Tue Oct + -: --Crash ( in+ +: -) root tty1 Tue Oct + -: at-Crash ( in+ +: the) reboot system boot2.6. +-431. el6.i Tue Oct + -: --Geneva: A( the+ the: A) root pts/0 110.13.4.236Tue Oct + .: to- .: +(xx:xx) root tty1 Tue Oct + .: in-Crash ( A: -) reboot system boot2.6. +-431. el6.i Tue Oct + .: --Geneva: A( the+ +: Wu) Wtmp begins Tue Oct + .: -: in the
(7) Lastlog
The lastlog command is used to check the last logon time for a particular user , where the path is/usr/bin/lastlog, with the syntax in the following format:
Lastlog
Example: Lastlog or Last-u 500
- Username Port from latestws pts/0 110.13. 4.109 Fri Jan 2: £º + 08002015
(8) Traceroute
The traceroute command is used to display the path information between packets to the host , where the path is/bin/traceroute, with the syntax in the following format:
Traceroute website
(9) Netstat
The netstat command is used to display network-related information , where the path is/bin/netstat, with the syntax in the following format:
netstat [options]
where the-t option represents the TCP protocol, the-U option represents the UDP protocol,-L for listening,-R for routing, and-n for displaying the IP address and port number .
such as: view the local listening port-----netstat-tlun
View all network connections on this computer-----netstat-an
view the native routing table-----Netstat-rn.
(Ten) Setup
The Setup command is used to configure the network, which is characterized by a permanent effect , unlike Ifconfig, where the path is/usr/bin/setup and its syntax is in the following format:
Setup
Note: This command is a proprietary command of the Red Hat series .
(one) Mount
The mount command is used for mounting , where the path is/bin/mount, with the syntax in the following format:
Mount [-t file system] device file name mount point
Example: Create a CDROM folder as a mount point in the/mnt directory, then select an ISO image and mount it:
mkdir /mnt/Mount /dev/sr0/mnt/cdrom/Mountwrite-protected, mounting read-ls /mnt/cdrom/autorun.inf Casper EFI isolinux pics preseed ubuntuboot dists install md5sum.txt Pool Readme.diskdefines umount /dev/sr0
Linux Learning Notes (8) network commands for common Linux commands