7 Useful Linux Networking Commands

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.
Joined
Apr 14, 2010
Messages
35
Commands are simply great! however, I think that every complicated commands of Linux is useful in all ways. Every command is necessary to take advantage of Linux platform.
 

lotuseclat79

Thread Starter
Joined
Sep 12, 2003
Messages
20,583
Hi KristineHabeck,

Yes, they are great! Reading the man page on each command is, however, mandatory to really get to know what one is doing and what all the options can do for you. It is best to do small experiments with test files in separate directories to try things out to see how everything works. From there, you can begin to combine commands together in a script that lessens the workload of repetitive tasks, etc.

-- Tom
 
Joined
Apr 25, 2010
Messages
74
That makes a good bookmark for a quick and useful way to remember some important networking commands.

Playing around with SystemRescueCD, I discovered that in 3 steps, using only the command-line, you can fully configure a wired ethernet adapter and activate it so that it is internet-ready. These steps are not really necessary for desktop-oriented/user-friendly distros like Mint, openSUSE, Ubuntu, and Fedora, but they do come in handy if you're using a terminal or rescue CD. These commands need to be run as root or following "sudo", depending on the distro. Change the IP addresses accordingly.

First, activate the wired network card and assign it an IP address:
Code:
ifconfig eth0 192.168.1.2 up
Next, point it to your router as the default gateway:
Code:
route add default gw 192.168.1.1
Finally, add a DNS server for name-resolution:
Code:
echo "nameserver 8.8.8.8" >> /etc/resolve.conf
You should now be up-and-running and internet-ready. Of course, sometimes matters become more complicated based on other factors, but these three steps will usually suffice.

The last step can be repeated multiple times if you wish to add more DNS servers to the list. I recommend adding your router's IP address first, then add other DNS servers, such as OpenDNS or Google's public DNS.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Staff online

Members online

Top