Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the 10 common network commands under Linux?

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

The content of this article mainly revolves around what are the 10 commonly used network commands under Linux. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!

In the Linux system, whether you want to download files, diagnose network problems, manage network interfaces, or view network statistics, there are terminal commands that can be done.

10 commonly used Network commands under Linux

Hostnamehostname has no option to display the host name

Hostname d shows the domain name to which the machine belongs

Hostname f displays the full hostname and domain name

Hostname I displays the ip address of the current machine

Pingping sends the packet to the user to specify the address. When the packet is received, the target machine sends a return packet. Ping has two main functions:

Used to confirm that the network connection is open.

Used to view the speed information of the connection.

If you ping www.yahoo.com it will return its ip address. You can stop the command through ctrl+C.

Ifconfig views the user's network configuration. It displays the current network device configuration. This tool is extremely useful for error lookups that need to receive or send data.

The iwconfigiwconfig tool is similar to ifconfig and ethtool. It is used for wireless network card. You can use it to view and set up basic Wi-Fi network information, such as SSID, channel and encryption. There are many other configurations that you can also view and modify, including reception sensitivity, RTS/CTS, the fragment size of the sent packet, and the retransmission mechanism of the wireless network card.

When the nslookupnslookup command has an ip address, you can use this command to display the hostname and find all ip addresses for a given domain name. And you have to connect to the Internet to use this command.

An example. Nslookup blogger.com

You can also use nslookup to get the hostname from ip or ip from the hostname.

Traceroute is a convenient tool. It can be used to view the IP address, hop count, and response time of the router that the packet passes through when it is submitted to a remote system or website. Similarly, you must link to the Internet to use this command.

Finger views user information. Displays the user's login name, real name, as well as the login terminal name and login permissions. This is a very old command from unix and is seldom used now.

Telnet connects to the target host through the telnet protocol, and if the telnet connection can be completed on any port, it means that the connection between the two hosts is good.

Telnet hostname port-uses the specified port telnet hostname. This is usually used to test whether the host is online or whether the network is normal.

Ethtoolethtool allows you to view and change many settings of the network card (not including the Wi-Fi network card). You can manage many advanced settings, including tx/rx, validation, and Wake up. Here are some basic commands that might interest you:

Ethtool-I displays driver information for a specific network card, which is especially useful when checking software compatibility

Ethtool-p initiates the specified behavior of an adapter, such as flashing the adapter's LED light, to help you identify interface names in multiple adapters or interfaces

Ethtool-s displays network statistics

Ethtool speed sets the connection speed of the adapter in Mbps

Netstat found that host connections are the most useful and general-purpose Linux commands. You can use "netstat-g" to query all multicast groups (networks) subscribed to by this host.

Netstat-nap | grep port will display the process id of the application using this port

Netstat-an or netstat-all will display all connections including TCP and UDP

Netstat tcp or netstat-t will display the TCP connection

Netstat udp or netstat-u will display the UDP connection

Netstat-g will show all multicast networks that the host subscribes to.

Thank you for your reading. I believe you have a certain understanding of "what are the 10 commonly used web commands under Linux". Go ahead and practice it. If you want to know more about it, you can follow the website! The editor will continue to bring you better 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report