![]() |
● Software development
● Embedded systems
● Servers
● Smartphones
● Supercomputers
● LAMP
The use of LINUX is so widespread that about 80 percent of smartphones across the globe and 90 percent of internet servers extensively use Linux.
The Internet is nothing but a platform to exchange information of all sorts in all formats through the use of various systems. For the efficient exchange of information, there needs to be a network connecting them. Networking is a broad term that includes both networking within a particular network and networking across the entire internet. A network can be as simple as a home or office network and as complicated and complex as the one designed for a whole university, a space station, or the entire internet for that matter.
Troubleshooting and configuration are two essential components of a networking system. Here, we'll talk about the networking commands in Linux.
This command is similar to netstat in the matter of the fashion of displaying information. Hence, it is also known as a new netstat. You can utilize the command line of ss command to get the stats for various domain sockets viz. UDP, DCCP, TCP, RAW, Unix, etc. Further, this command helps you to retrieve information regarding the communication of your Linux system with other systems, machines, networks as well as services. Following are details obtained by the ss command:
Syntax: ss [options] [filter]
Example:
Command: ss DST 216.58.216.184
Use: To know the mode of connection of the machine with the mentioned IP address with your Linux system. It displays the netid, network statistics, the local as well as remote IP port of the socket linked to the IP address 216.58.216.18
This command in Linux helps to find the information about the IP address of a specific domain name or vice versa. There are multiple options available for use along with this command through which one can get detailed information about any domain. This command is particularly used to perform a lookup of the DNS (Domain Name System).
Syntax: The general syntax of Host command is {[-aCdlriTWV] [-c class] [-N ndots] [-t type] [-W time] [-R number] [-m flag] hostname [server]}
Example:
Command: $ host google.com
Use: To get the IP addresses associated with the domain name.
Using this command, one can find out information related to a domain such as the information related to the owner of the domain and his/her contact details, the servers connected to specific domains, etc. This is a tool that works on the principle of queries and responses. The base of this tool is the TCP platform. The server of this command takes up the queries through port number 43. This allows the storage and delivery of the response in a human-understandable format.
Syntax:
a. General syntax: whois [-h Host] [-p Port] [-aCFH1LMmrRSVx] [-g SOURCE: FIRST-LAST] [-i ATTR] [-s Source] [-T TYPE] object
b. Modified syntax:
whois –v TYPE
whois –q keyword
Etc.
Example:
Command: whois educationculture.com
Output: A whois query on the domain name
Become a Linux Certified professional by learning this HKR Linux Networking Training !
Curl and wget are the command line interfaces used to download files from the internet. Both commands support HTTPS along with HTTP. They also support FTP and SFTP. The curl and wget commands are also used to test the newly launched URLs on the website against already existing URLs.
Syntax:
curl – o
wget
Example
Command:
Output:
You can use both the commands to download the file. The wget command downloads the file and saves it as index.html.
Want to know Linux from Scratch, visit here Linux Tutorial
This command traces back the network path of the destination mentioned in the command. In instances where you are experiencing a slow or weak network, this command can help you to determine the spots that are responsible for the slow network. Unlike traceroute, the tracepath command does not require any user privileges.
Syntax:
Tracepath
Tracepath [-nc]
Tracepath [other options like –t, -b, etc.]
Example
Command: tracepathwww.javaendpoint.com
Output: This command displays the TTL of the probe followed by the address of the local host followed by the miscellaneous RTT values.
The command ifconfig simply means interface configuration. It can perform multiple tasks right from the initialization of the interface to assignment of IP address, deleting, adding, or controlling an IP address, etc. Commonly, Linux users use this command to enable or disable any network interface.
Syntax:
Example:
Command: ifconfig google.com down
Output: The command deactivates the driver of the interface google.com
This command can fire queries for DNS servers. Here, the dig is an abbreviation to Domain Information Groper. One can verify or troubleshoot the problems related to DNS through this command. It is also used to perform lookup operations for DNS. The command replies to the queries related to the name server added along with the commands. One can find this tool in the majority of the LINUX distributions.
Syntax: dig
Example:
Command: dig google.com.
Output: The output starts with the display of the installed version of dig followed by the global options. The further output displays the technical information related to the domain. Further displayed are the question, answers, and other additional sections.
This command as a replacement of the configure command serves many purposes. You can get information about the configured interface on the system through this command. Secondly, the command can trace the status of the query and you can also use it for Ethernet as well as IP address configuration. There are several other uses of this command like setting up or deleting the routing entry, displaying the cache entries, getting information about IP addresses, management, and display of the current network positions, etc.
Syntax: ip [options] [object] command
Example:
Command: ip –s –s –n –f 261.84.261.91
Output: The command flushes ARP entry of the given IP address
The mtr here stands for my traceroute. It is a combination of ping and tracepath commands. This cross-system command displays the entire path travelled by the network packets, right from the source to the destination. The command also displays the amount of response and response time taken by all the network hops in the entire path. There are various options available with this command. For example, the use of -b option is to view the hostnames as well as numerical IP address, and the use of -c option is to set a limit on pings, etc.
Syntax: mtr [option]
Example:
Command: $ mtr –m 60 216.18.216.32
Output: Specifies the number of network hops between the source and the destination within the last 60 seconds.
Take your career to next level in Cisco ISE with HKR. Enroll now to get Cisco ISE Training!
This command helps the user to know about the plugin status of a cable in the network interface of the user. This command-line is not installed in Ubuntu. The user can install it by using the command sudo apt-get install ifplugd. This command supports all the APIs along with the WLANs. This command has multiple flags used to perform varied functions.
Syntax:
Example:
Command: @VeeFix : $ ifplugstatus
Output: The output displays the status of plugins installed and it also displays the plugins that are not installed on the domain. If the output says 'link beat detected', the plugin installation is successful.
You can get answers to the queries related to DNS using this command. You can also use it to get the following details:
It can work in both interactive as well as non-interactive modes.
Syntax:
Example:
Command: nslookup optimetrix.com
Output: The output displays the name of the host server along with its numeric IP address
This command is mainly used to identify and troubleshoot connectivity faults. This command sends single or multiple ICMP packets of echo requests to the target destination IP address. After this, it waits for the reply that the destination reverts back through an ICMP echo packet. Thus, you can check the activity of any system using this command.
Syntax: ping [options]
Example:
Command: $ ping informationtech.com
Output: If the IP is active, the output fields appear on the screen
ARP is an abbreviation for Address Resolution Protocol. This command displays the cache data of the kernel's IP address. Using this command, one can add, delete, or display the entries in the kernel's table. To install arp on a Linux system, the user needs to type 'sudo apt-get update'.
Syntax: arp [objects]
Example:
Command: arp
Output: This command displays the network card details along with the connectivity of Ethernet.
This command is similar to ifconfig, but it only works with wireless network interfaces. Using this command, one can view as well as configure the basic details related to wireless network viz. the SSID, encryptions, frequency, etc. You can also use it to display the specifications along with wi-fi stats. There are various options available along with this command for extracting different information related to wireless networks.
Syntax: iwconfig
Example:
Command: iwconfig eth0 nickname "Nodal Linux."
Output: This command assigns nicknames to the concerned wireless station. But you can use it with only a few wireless diagnostic tools.
Here, netstat means network statistics. One can get the following details about a particular network using this command:
You can also use this command to troubleshoot the issues related to the network.
Syntax: netstat [options]
Example:
Command: netstat –at
Output: List of all the ports related to TCP
Command: netstat –au
Output: List of all the ports related to udp
Conclusion:
The list of Linux commands mentioned above can efficiently solve your problems related to networking and the functions related to connectivity. If you are working with a Linux system, there are many such networking commands available for better networking. Each command has several options for performing specific functions. Install the command-lines related to these commands and the commands will be ready to use for better networking on your Linux system.
A technical lead content writer in HKR Trainings with an expertise in delivering content on the market demanding technologies like Networking, Storage & Virtualization,Cyber Security & SIEM Tools, Server Administration, Operating System & Administration, IAM Tools, Cloud Computing, etc. She does a great job in creating wonderful content for the users and always keeps updated with the latest trends in the market. To know more information connect her on Linkedin, Twitter, and Facebook.
Batch starts on 12th Dec 2023 |
|
||
Batch starts on 16th Dec 2023 |
|
||
Batch starts on 20th Dec 2023 |
|