2016/8/19 Linux common commands: Network command, power off restart command

Source: Internet
Author: User

1. Send message to User: Write, End with CRTL + D

Write User name

2. Broadcast information: Wall

Wall [message]

3. Test network connectivity: Ping

Ping option IP Address

-C specify number of times to send

Example: Ping 192.168.1.102

4. View and set network card information: ifconfig

Ifconfig NIC name IP address

Example: Ifconfig eth0 192.168.1.102

5. View outgoing Email: Mail

Mail [user name]

6. List user information currently logged into the system in the past: last

7. Check the last logon time for a specific user: Lastlog

Example: Lastlog

Last-u 502

8. Display the path between the packets to the host: traceroute

Example: Traceroute www.wgying.net

9. Display network-related information: netstat

netstat [options]

-T TCP protocol

-U UDP protocol

-L Monitoring

-R Routing

-N Display IP address and port number

Example:

Netstat-tlun: View the port on which this machine listens

Netstat-an: View all network connections on this computer

Netstat-rn: Viewing the native routing table

10. Configure the network: Setup

11. Mount Command: Mount

Mount [-t file system] device file name mount point

Example: Mount-t iso9660/dev/sr0/mnt/cdrom

12. Shutdown or restart shutdown

shutdown [Options] Time

-C cancels the previous shutdown command

-H shutdown

-R Restart

13. Other shutdown commands: Halt, Poweroff, Init 0

14. Other Restart commands: Reboot, init 6

15. System Operating Level:

0 Turn off the machine

1 Single User

2 not fully multiuser, no NFS service included

3 Full Multi-user

4 Not assigned

5 graphical interface

6 restart

16. Check the system operating level: RunLevel

17. Modify the system default operating level: Cat/etc/inittab

Id:3:initdefault:

18. Exit the login command: Logout

2016/8/19 Linux common commands: Network command, power off 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.