,

Basic Linux Networking Commands

mahdine360@gmail.com Avatar
Basic Linux Networking Commands

Linux provides a robust set of networking commands that allow users to configure, manage, and troubleshoot network connections. Below is a list of essential Linux networking commands and their uses.

1. ifconfig

Used to find network details, including IP addresses, interfaces, and MAC addresses. It can also enable or disable an interface.

2. ip

A more powerful alternative to ifconfig, the ip command is used for displaying and managing routing, network devices, and interfaces.

3. traceroute

A troubleshooting utility that traces the full path of a packet from your local system to another network, helping diagnose connectivity issues.

4. ping

Used to test the connectivity between two hosts in a network using ICMP requests. It helps in diagnosing network reachability.

5. netstat

Displays network statistics, active connections, listening ports, routing tables, and network protocol usage.

6. ss

A faster alternative to netstat, the ss command displays socket statistics and detailed connection information.

7. dig

A domain lookup tool that queries DNS servers to fetch records like A, MX, CNAME, and TXT records.

8. route

Displays and manipulates the IP routing table to manage network traffic.

9. nslookup

A command-line tool used for querying DNS servers and obtaining domain name or IP address details.

10. host

Displays domain name system (DNS) details, such as IP addresses and mail handling details.

11. arp

Shows and manages the ARP cache, which maps IP addresses to MAC addresses.

12. iwconfig

Similar to ifconfig, but used for configuring wireless network interfaces.

13. hostname

Displays and sets the system’s hostname, which is useful in network environments.

14. whois

Queries public domain registration databases to fetch information about website ownership and details.

15. tracepath

Similar to traceroute but does not require root privileges. It traces network paths and detects MTU (Maximum Transmission Unit) settings.

16. curl

Used for transferring data from or to a server using various protocols such as HTTP, FTP, and IMAP.

17. wget

A command-line tool for downloading files from the internet using HTTP, HTTPS, and FTP protocols.

18. mtr

Combines ping and traceroute functionalities to provide real-time network diagnostics.

19. iftop

Displays real-time bandwidth usage of network interfaces and helps in diagnosing network performance.

20. tcpdump

A packet-sniffing tool that captures network traffic for analysis.

21. iperf

An open-source utility that measures network performance and bandwidth.

22. ethtool

A command-line tool used to configure and diagnose network interface card (NIC) parameters.

23. scp & sftp

Used for securely transferring files over SSH. SCP is faster, while SFTP provides an interactive file management interface.

24. rsync

Efficiently synchronizes files and directories between different systems over a network.

25. ifplugstatus

Checks whether a network cable is connected to an interface.

26. nload

Monitors network bandwidth usage in real time.

27. nmcli

A command-line tool for managing NetworkManager settings and connections.

28. bmon

A bandwidth monitoring tool that provides real-time statistics on network usage.

29. nc (netcat)

A versatile tool used for debugging and interacting with network connections via TCP and UDP.

30. nmap

A powerful network scanning tool used for security auditing and discovering network devices.

31. tshark

A command-line network protocol analyzer that captures and inspects packets in real time.

32. vnstat

A lightweight tool that monitors network traffic and bandwidth usage over time.

Conclusion

These Linux networking commands provide essential functionalities for system administrators, network engineers, and security professionals. Mastering these commands can greatly enhance network troubleshooting, monitoring, and security assessment capabilities.

Leave a Reply

Your email address will not be published. Required fields are marked *