From charlesreid1

Revision as of 05:17, 13 March 2016 by Admin (talk | contribs) (Created page with "=ping= Okay, you have managed to run ping. You have even figured out how to use the <code>-c</code> flag. In this case, ping will attempt four times, stop, and then report so...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ping

Okay, you have managed to run ping. You have even figured out how to use the -c flag. In this case, ping will attempt four times, stop, and then report some basic statistics to you.

Knowing how to check whether or not you're connected is one thing, but what do you do when you're not? Or what if your network connection is active, but reports invalid information and you need to reconfigure it?

First, let's explore how to check our current configuration. In Debian, the file that controls the network devices by default is the following:

/etc/network/interfaces

Depending on several variables, which include how you configured your Debian installation, this file may be created differently. First, you may see several interfaces listed, such as your loopback adapter, wired Ethernet, and wireless. If you have more than one wired interface, you'll see any additional adapters here as well. This file is, simply put, a configuration file. It's a text file that contains information that the underlying Linux system understands, and causes a device to be configured as designated in the file.

To edit files such as these, there are many Linux text editors available, both GUI and terminal based. My personal favorite is vim, though many administrators typically start off with nano. The nano text editor is fairly easy to use, though very light on features. Alternatively, vim has many more features than nano but is a bit harder to get used to. Take your pick. To open a file in nano, all you need to do is type nano along with the name of a text file you would like to edit. If the file doesn't exist, the command will create it if you save the file. In the case of our /etc/network/interfaces file, the command will be similar to this:

# vim /etc/network/interfaces