In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "11 network commands that must be known under the Linux system". In the daily operation, I believe that many people have doubts about the 11 network commands that must be known under the Linux system. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the questions of "11 network commands that must be known under the Linux system". Next, please follow the editor to study!
1.curl & wget
Using the curl or wget command, you can download files without leaving the terminal. If you use curl, type curl-O followed by a file path. Wget does not require any options. The downloaded file is in the current directory.
The code is as follows:
Curl-O website.com/file wget website.com/file
2.ping
Ping sends ECHO_REQUEST packets to the address you specify. In this way, you can easily confirm whether your computer is connected to Internet or a specified IP address. Using the-c switch, you can specify the number of ECHO_REQUEST packets to send.
The code is as follows:
Ping-c 4 google.com
3.tracepath & traceroute
The tracepath command is similar to the traceroute command, but does not require root permissions. And Ubuntu pre-installed this command, traceroute command is not pre-installed. Tracepath tracks the network path to the specified destination address and gives each hop (hop) on the path. If your network has a problem or is slow, tracepath can find out where the network is down or slow.
The code is as follows:
Tracepath example.com
4.mtr
The mtr command combines the ping command with the tracepath command. Mtr will continue to send packets and show how long it takes to ping each hop. Any problems in the process will also be displayed, and in the example below, you can see that more than 20% of the packets were lost at No. 6.
The code is as follows:
Mtr howtogeek.com
Type Q or CTRL + C to exit the command.
5.host
The host command is used to do DNS queries. If the command parameter is a domain name, the command outputs the associated IP;. If the command parameter is IP, the command outputs the associated domain name.
The code is as follows:
Host howtogeek.com host 208.43.115.82
6.whois
The whois command outputs the whois record of the specified site, and you can see more information such as who registers and owns the site.
The code is as follows:
Whois example.com
7.ifplugstatus
The ifplugstatus command can tell you whether a network cable is plugged into the network interface. This command, Ubuntu, is not preinstalled, and is installed by the following command:
Sudo apt-get install ifplugd
This command can view the status of all network interfaces, or specify the status of network interfaces:
The code is as follows:
Ifplugstatus ifplugstatus eth0
The command output "Link beat detected" (connection heartbeat detected) indicates that there is a network cable plugged in, and if not, it will output "unplugged" (not plugged in).
8.ifconfig
Ifconfig is used to output various options for network interface configuration, tuning, and debug. You can quickly view information about IP addresses and other network interfaces. Type ifconfig to view the status of all enabled network interfaces, including their names. You can specify the name of the network interface to display information about only this one interface.
The code is as follows:
Ifconfig ifconfig eth0
7.ifdown & ifup
The ifdown and ifup commands have the same function as running ifconfig up,ifconfig down. Given the name of a network interface, only this interface can be disabled or enabled. Root permission is required, so you need to use sudo to run it on Ubuntu.
The code is as follows:
Sudo ifdown eth0 sudo ifup eth0
Running these two commands on a Linux desktop system is likely to output an error message. The Linux desktop manages your network interface by using the Network Manager (NetworkManager). However, these two commands are still available on the server version where the network manager is not installed.
If you do configure the network manager on the command line, use the nmcli command.
10.dhclient
The dhclient command releases your computer's IP address and gets a new one from the DHCP server. Root permission is required, so sudo is required on Ubuntu. There is no option to run the command to get the new IP, or specify the-r switch to release the current IP address.
The code is as follows:
Sudo dhclient-r sudo dhclient
11.netstat
The netstat command displays many statistics about network interfaces, including open socket and routing tables. There is no option to run the command to display the open socket.
This command has many functions. For example, the netstat-p command can display the program corresponding to the open socket.
Netstat-s displays detailed statistics for all ports.
At this point, the study of "11 network commands that must be known under the Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.