For Legend look here
On Unix systems you can get and configure the network from the command line.
There are also some commands, to test and analyze the local connections.
Pinging a host and outputing the results:
ECHO Requeststo the specified
- to see if a system is available on the network
- to check if the network is configured correct.
> ping www.hsrw.eu
Will check if your computer can resolve the domain www.hsrw.eu to an ip
and then it will check if there is a system with that IP.
Listing ip addresses of all network interfaces:
Compatible on nearly all unix based systems:
On reasonable modern linux systems:
> ip addr
Getting routing information:
Routing, determines which interface to use to send and recieve traffic
> netstat -rn
-rmeans: show routing table,
-nshow information as numbers,
the last part is sometimes important, to avoid additional DNS request and
> netstat -f inet6 -rn
- Linux systems:
> ip route
> ip -6 route
Display of all active listening ports:
> netstat -pnltu
Fetching whois information for domain:
> whois domain
Fethcing DNS information for domain:
> dig domain
Downloading a file:
> wget file
Curl is a command line tool used to transfer data using any supported protocols
As default, curl will output the response it got to the command line
> curl option domain
> curl https://www.hochschule-rhein-waal.de/en > curl ftp://ftp.example.com/file[1-20].jpeg
SSH or Secure Shell is used to securely gain command line access to systems
over non secure networks.
Connection to a host as a user:
> ssh user@host
> ssh firstname.lastname@example.org
Connection to a host on specific port as a user:
> ssh -p port user@host
In order to enable a passwordless login you can use:
This will copy the public key of the local ssh id to a special file
.ssh/of the home folder of the user
HINT: This requires that the next command was done before
> ssh-copy-id user@host
SSH is able to use a private/public cryptographic key-pair for
To generate such a key-pair, the following command can be used:
> ssh-keygen -b 4096
This will generate a 4096 bit length RSA key.
It will also ask for a password to secure the key.