Linux Series Tutorials (ix)--linux Common command Network and shutdown Restart command

Source: Internet
Author: User

Previous Blog We explained the Linux compression and decompression command, the most used is the tar command, because now a lot of source packages are. tar.gz format, through TAR-ZCVF can complete decompression. Then for the. zip format of the file, using the Gunzip command decompression, for the. zip format of the file, using the Unzip command decompression, and finally for the larger file, we use the BUNZIP2 command to extract.

This blog is the last of our Linux commands--the network and shutdown restart commands.

1, Network command One, send a message to the specified user: write

①, command name: Write

② and English original meaning:

③, command path:/usr/bin/write

④, execute permissions: All Users

⑤, Function Description: Send information to the specified user to Ctrl+d save end

⑥, Syntax: write "user name"

Example: Sending a message to a VAE User: Write Vae

Second, send broadcast message to all users: wall

①, command name: Wall

②, English intent: Write all

③, command path:/usr/bin/wall

④, execute permissions: All Users

⑤, Function Description: Send broadcast information

⑥, Syntax: Wall "information content"

Example: Send broadcast message: WALL Hello Linux!!!

Third, test network connectivity: Ping

①, command name: Ping

② and English original meaning:

③, command path:/bin/ping

④, execute permissions: All Users

⑤, Function Description: Test network connectivity

⑥, Syntax: ping "-C N" "IP Address"

-c n is the specified number of times, if not specified, the connection information will be sent continuously

Example: Testing a connection to Baidu: Ping www.baidu.com

  

Iv. Viewing and setting network card information: ifconfig

①, command name: ifconfig

② and English original meaning: interface configure

③, command path:/sbin/ifconfig

④, execute permissions: root

⑤, Function Description: View and set network card information

⑥, Syntax: ifconfig "NIC name" "IP Address"

Example 1: View native NIC information: ifconfig

  

Example 2: View eth0 network card information: ifconfig eth0

  

V. View send e-mail: Mail

①, command name: Mail

② and English original meaning:

③, command path:/bin/mail

④, execute permissions: All Users

⑤, function Description: View send e-mail

⑥, Syntax: Mail "user name"

Example: Sending a message to the root user: Mail root

  

Vi. List user information for all login systems: Last

①, command name: Last

② and English original meaning:

③, command path:/usr/bin/last

④, execute permissions: All Users

⑤, Function Description: Lists all logged-on system user information

⑥, grammar: Last

Example: View all users logged on to the system: last

  

Vii. displaying the path between packets to the host: traceroute

①, command name: traceroute

② and English original meaning:

③, command path:/usr/bin/traceroute

④, execute permissions: All Users

⑤, Function Description: Shows the path between packets to the host

⑥, Syntax: traceroute "IP Address"

Eight, display network related information: netstat

①, command name: netstat

② and English original meaning:

③, command path:/bin/netstat

④, execute permissions: All Users

⑤, Function Description: Display network-related information

⑥, Syntax: netstat "options"

-T TCP protocol

-U UDP protocol

-L Monitoring

-R Routing

-N Display IP address and port number

Example 1:netstat-tlun viewing the port for native listening

Example 2:netstat-an view all network connections on this computer

Example 3:netstat-rn viewing the native routing table

Nine, configure the network: Setup

①, command name: Setup

② and English original meaning:

③, command path:/usr/bin/setup

④, execute permissions: root

⑤, Function Description: Configure the network, such as IP address, subnet mask, etc.

⑥, Syntax: Setup

  

  

Ten. Mount command: Mount

①, command name: Mount

② and English original meaning:

③, command path:/bin/mount

④, execute permissions: All Users

⑤, function Description: to the CD-ROM, u disk and other external storage devices such as the distribution of Windows system-like drive letter, easy to access

⑥, Syntax: Mount "-T File system" device file name mount point

Example: Put a CD in the virtual machine CD

  

Mount the disc to the/mnt/cdrom directory: Mount-t iso9960/dev/sr0/mnt/cdrom. -T iso9660 can omit

  

Uninstall: Umount/dev/sr0

2, Shutdown Restart command one, Shutdown command (recommended)

①, command name: shutdown

② and English original meaning:

③, command path:/sbin/shutdown

④, execute permissions: root

⑤, Function Description: Perform shutdown restart operation

⑥, Syntax: Shutdown "Options" "Time"

-C cancels the previous shutdown command

-H shutdown

-R Restart

Example 1: Shut down immediately: Shutdown-h now

Example 2: Evening 8:30 shutdown: shutdown-h 20:30

  Note: It is recommended to use this command to shut down the system before this command shuts down properly.

Second, other shutdown commands

①, halt

②, Poweroff

③, Init0

Iii. Other Restart commands

①, reboot

②, INIT6

Iv. Sign out of the login command

①, Logout

3. Summary

This blog we introduce the Linux network and shutdown Restart command, the network command we use a lot of test network connectivity Ping, view network card information, such as viewing the local IP address ifconfig, configuration network setup and so on. Shutdown Restart command Everyone just need to remember the use of shutdown, shutdown command in the execution of the shutdown will be the correct shutdown of the system related services, and other shutdown Restart command is not recommended here.

Linux Series Tutorials (ix)--linux Common command Network and shutdown Restart command

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.