Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This command is used to display the contents of the /proc/net files. This command works with the Linux network subsystem and will let you know on the status of the ports if they are open, closed, waiting or masquerade connections. This provides various other information based on using the many options that these commands provide with.
2. tcpdump:
This is a sniffer command, basically a program that targets on capturing the packets of a networking interface and also does the interpretation of these for you. This command understands all the basic internet protocols and it can also be used to save the entire packets for inspection that can be always performed later.
3. ping:
This command derives its name after the sound of an active sonar system and performs a similar activity on a Linux networking system as well. This command is used to send echo requests to a host that we specify in conjunction with this command and further lists the responses that are received from the round trip time.
PING (Packet INternet Groper) command is the best way to test connectivity between two nodes. To stop a ping to a host, we may use the keyboard keys CTRL + C together to break it.
ping 10.76.56.16
Using ping /smbmount/ssh or any other UNIX system programs with a fully qualified domain name (FQDN) instead of an IP address will work out if and only if, these computers are listed in your /etc/hosts file or else it won’t.
4. hostname:
This command lets the system or network administrator know the hostname of the computer that they are logged into. This may sometimes be called as host as well.
5. traceroute:
This command is used to know the route of a packet. This command will list all the series of hosts through which the packets have gone through or traveled through on its way to the specified destination. There are many graphical equivalents to this command/program and one of such commands is xtraceroute.
Traceroute command usage can be as follows:
traceroute machine_name or ip
6. tracepath:
The command tracepath does a similar function to that of traceroute but differs mostly on the fact that the tracepath command doesn’t take complicated options.
tracepath machine_name or ip
7. findsmb:
The findsmb command is used to list down all the information about machines that do respond to the SMB name queries. To take an example, the windows based machines which share their hard disks.
This command will list down all possible machines and to control over the output that you see, you may want to specify a particular subnet to query upon to retrieve machines pertaining to it alone.
8. nmap:
This command is a very sophisticated network tool that is used to query for machines (either local or remote machines) to check whether they are UP and Running, and if so, on what ports are open on these machines. This command/tool can be safely understood as a network exploration tool and also a security scanner.
The command usage is pretty simple, as shown as below:
nmap machine_name
This would query on the machine name that is provided on what ports are kept open. nmap is a wonderful and the most powerful tool for which documentation is available on the nmap site itself.
I'd add lsof to that list and generally use it in place of netstat for everything but listing route table.
lsof -i @host : port
Where host is the IP or hostname and port is the port you want to examine for that host. You can do it without the @host if you just want to see what is using the port "lsof -i : port". You can also use lsof to specify the PID in which you're interested to see what connections it has: "lsof -p<PID> -i". Of course you can use "lsof -i" to see all hosts and ports.
lsof is "list open files" and had more uses beyond networking. I find it an invaluable tool for day to day troubleshooting and analysis.
Also tools such as "ifconfig" and "ip" for looking at interfaces configured and other information.
Tools like "ethtool" to look at settings (speed/duplex etc...) on interfaces as well as to change advertised settings for autonegotiation.
Using ping /smbmount/ssh or any other UNIX system programs with a fully qualified domain name (FQDN) instead of an IP address will work out if and only if, these computers are listed in your /etc/hosts file or else it won’t.
Nice summary of commands. Only one comment: FQDN's will also work in place of an IP address if the FQDN resolves via DNS. The Domain Name System's purpose is to retrieve the IP address for a domain name.
May I add ifup and ifdown to enable/disable network interface.
Thanks again,
Denny
Quote:
Originally Posted by gracylayla
1. netstat:
This command is used to display the contents of the /proc/net files. This command works with the Linux network subsystem and will let you know on the status of the ports if they are open, closed, waiting or masquerade connections. This provides various other information based on using the many options that these commands provide with.
2. tcpdump:
This is a sniffer command, basically a program that targets on capturing the packets of a networking interface and also does the interpretation of these for you. This command understands all the basic internet protocols and it can also be used to save the entire packets for inspection that can be always performed later.
3. ping:
This command derives its name after the sound of an active sonar system and performs a similar activity on a Linux networking system as well. This command is used to send echo requests to a host that we specify in conjunction with this command and further lists the responses that are received from the round trip time.
PING (Packet INternet Groper) command is the best way to test connectivity between two nodes. To stop a ping to a host, we may use the keyboard keys CTRL + C together to break it.
ping 10.76.56.16
Using ping /smbmount/ssh or any other UNIX system programs with a fully qualified domain name (FQDN) instead of an IP address will work out if and only if, these computers are listed in your /etc/hosts file or else it won’t.
4. hostname:
This command lets the system or network administrator know the hostname of the computer that they are logged into. This may sometimes be called as host as well.
5. traceroute:
This command is used to know the route of a packet. This command will list all the series of hosts through which the packets have gone through or traveled through on its way to the specified destination. There are many graphical equivalents to this command/program and one of such commands is xtraceroute.
Traceroute command usage can be as follows:
traceroute machine_name or ip
6. tracepath:
The command tracepath does a similar function to that of traceroute but differs mostly on the fact that the tracepath command doesn’t take complicated options.
tracepath machine_name or ip
7. findsmb:
The findsmb command is used to list down all the information about machines that do respond to the SMB name queries. To take an example, the windows based machines which share their hard disks.
This command will list down all possible machines and to control over the output that you see, you may want to specify a particular subnet to query upon to retrieve machines pertaining to it alone.
8. nmap:
This command is a very sophisticated network tool that is used to query for machines (either local or remote machines) to check whether they are UP and Running, and if so, on what ports are open on these machines. This command/tool can be safely understood as a network exploration tool and also a security scanner.
The command usage is pretty simple, as shown as below:
nmap machine_name
This would query on the machine name that is provided on what ports are kept open. nmap is a wonderful and the most powerful tool for which documentation is available on the nmap site itself.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.