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 commonly used network commands in Linux system

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly shows you "what are the network commands commonly used in Linux system", the content is simple and easy to understand, and the organization is clear. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn "what are the network commands commonly used in Linux system" this article.

hostname

hostname No option, show host name

hostname-d Displays the domain name of the machine

hostname-f Displays the full hostname and domain name

hostname-i Displays the IP address of the current machine

ping

ping sends packets to the user-specified address. When a 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 speed information for connections.

If you ping www.yahoo.com it will return its ip address. You can stop commands by pressing Ctrl+C.

ifconfig

View user network configuration. It displays the current network device configuration. This tool is extremely useful for finding errors that require receiving or sending data.

iwconfig

The iwconfig tool is similar to ifconfig and ethtool. It's for wireless cards. You can use it to view basic Wi-Fi network settings, such as SSID, channel, and encryption. There are many other configurations you can view and modify, including receive sensitivity, RTS/CTS, fragment size of packets sent, and retransmission mechanisms for wireless cards.

nslookup

nslookup This command can be used to display the host name when there is an ip address. It can find all ip addresses of a given domain name. You must be connected to the Internet to use this command.

examples. nslookup blogger.com

You can also use nslookup to get host names from ip or ip from host names.

traceroute

A handy tool. It can be used to view the IP address, hop count, and response time of the router through which the packet is submitted to a remote system or website. You must also be connected to the Internet to use this command.

finger

View user information. Display user login name, real name, login terminal name and login authority. This is an old unix command that is rarely used anymore.

telnet

Connect to the target host via telnet protocol, and if telnet connection can be completed on either port, it means that the connection between the two hosts is good.

telnet hostname port-telnet hostname using the specified port. This is usually used to test whether the host is online or whether the network is working properly.

ethtool

Ethtool allows you to view and change many settings on your network card (not including Wi-Fi cards). You can manage many advanced settings, including tx/rx, checkouts, and wake-on-network functionality. Here are some basic commands you might be interested in:

ethtool -i Displays driver information for a specific NIC, especially useful for checking software compatibility

ethtool -p Initiates specific behavior for an adapter, such as flashing the adapter LED to help you identify interface names among multiple adapters or interfaces

ethtool -s Display network statistics

ethtool speed Sets the connection speed of the adapter in Mbps

netstat

Discover the most useful and common Linux commands for host connectivity. You can query all multicast groups (networks) subscribed to by this host using "netstat -g"

netstat -nap |grep port will display the process id of the application using that port

netstat -a or netstat-all will display all connections including TCP and UDP

netstat-tcp or netstat-t Displays TCP connections

netstat-udp or netstat-u will show UDP connections

netstat -g displays all multicast networks to which the host subscribes.

The above is "Linux system commonly used network commands which" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

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