Can we practice Unix commands in mobile devices

The 10 most important Linux commands for networks and the Internet

Hans-Christian Dirscherl

The ten most important Linux commands for networks and the Internet. This means that Linux beginners and those switching from Windows can quickly find the most important information about the configuration of their network access and test their Internet connection. Conveniently from the command line. On every Linux system.

EnlargeOf course, there are great desktops for Linux out there. But a lot can be done faster on the command line. For example with the ten most important Linux commands for network and Internet.
© Profit_Image /

Linux was created from the start for networking with other computers. Linux therefore provides all the necessary commands for network configuration on the command line. Software with a graphical user interface is therefore not absolutely necessary for the network configuration.

The shell commands alias command line commands have two main advantages:

1. They are available on all Linux systems with the same syntax or can be quickly installed with package management systems such as apt. Regardless of which distribution you are using. So you do not have to familiarize yourself with the different configuration tools of the various desktop managers.

2. You can still use these commands if, for example, your desktop manager is damaged and you can no longer start a graphical user interface (which can be the case, for example, after a major update that goes wrong, or if you have a new graphics card for which Linux does not yet have drivers available).

Linux command reference. Shell commands from A to Z. By Michael Kofler

Linux expert Michael Kofler describes the most important Linux commands and their options on over 460 pages. The command reference is structured alphabetically, making it easy to look up. The commands are also structured thematically so that you can find the right command even if you don't yet know its name. Plus: overview of configuration files and keyboard shortcuts. Available for 19.90 euros from Rheinwerk Verlag.

In a professional environment, i.e. in server administration, the command line commands are even the standard route to administration. So if you know the typical Linux commands for network configuration and checking the Internet connection, it will be easier for you to start your career here. The actual server commands such as ssh or starting the Apache web server as well as commands from the Samba context are not presented in this article. In addition, we limit ourselves to introducing the basic functions of the individual commands. Because for most Linux commands there are many parameters and options that beginners can easily confuse.

Note 1: The Linux commands presented here should work on all Linux distributions; our test basis was two Ubuntu notebooks. You may have to install the relevant program package first using the package management of your Linux system. You can do this on Debian-based Linux distributions such as Ubuntu either directly on the command line with "apt" or via the corresponding program in your desktop interface.

Note 2: You should be familiar with the basic functionality of the Linux shell or command line. If you've never typed a Linux command before, read this article first: The Top 10 Linux Commands for Beginners. And then read on here again.

And off we go with the ten most important commands for network and Internet:

1. ip addr / ip a to manage theNetwork interfaces

The ip command from the iproute2 tool collection has been replacing the "ifconfig" command (see point 2 below) and also covers IPv6 comprehensively (ip also replaces the old "arp" and "route" commands). With ip addr you can quickly display and configure all existing network interfaces. Eth0 denotes the first LAN network card, lo the loopback and wlan0 the first WLAN chip. Some Linux systems now use their own names for the interfaces.

If ip addr or ifconfig only specifies an IP address for the loop interface (with lo this is always, then the other interfaces, i.e. for LAN cables or WLAN, are not yet configured.

EnlargeThe output of ip addr show under Kali Linux in Virtual Box.

With "ip -4 addr show" you can only display the IP4 addresses. "ip -6 addr show" provided the corresponding output for IP6.

Do you want to know the Mac address? The command "ip -0 addr show" delivers this. And "ip n s" shows the ARP cache.

With " ip addr show "Just display the network interfaces. The" ip a "command delivers exactly the same output. The" hostname "command, in turn, delivers exactly this name and nothing else. And the" hostname -I "command delivers the IP address of its own The IP address at which your computer can be reached from the Internet can be found with "curl".

EnlargeThe output of ip a under Kali Linux in Virtual Box.

The input ip route show again shows the address of the gateway, so it replaces the command "route" (see point 9 below)

2. Deprecated command: ifconfig for managing network interfaces

With ifconfig you obtained information about all existing network interfaces on Linux computers for many years and were also able to configure them if necessary. Both for cable networks (LAN) and wireless networks (WLAN). But ifconfig is increasingly being replaced by ip