Day 1 - Get to know your server
You should now have a remote server setup running the latest Ubuntu Server LTS (Long Term Support) version. You alone will be administering it. To become a fully-rounded Linux server admin you should become comfortable working with different versions of Linux, but for now Ubuntu is a good choice.
Once you have reached a level of comfort at the command-line then you’ll find your skills transfer not only to all the standard Linux variants, but also to Android, Apple’s OSX, OpenBSD, Solaris and IBM AIX. Throughout the course you’ll be working on Linux - but in fact most of what is covered is applicable to any system derived from the UNIX Operating System - and the major differences between them are with their graphic user interfaces such as Gnome, Unity, KDE etc - none of which you’ll be using!
YOUR TASKS TODAY
- Connect and login to your server, preferably using a SSH client
- Run a few simple commands to check the status of your server - like this demo
USING A SSH CLIENT
Remote access used to be done by the simple telnet protocol, but now the much more secure SSH (Secure SHell) protocol is always used. If your server is a local VM or WSL, you could skip this section by simply using the server console/terminal if you want. We will explore SSH more in detail at the server side on Day 3 but knowing how to use a ssh client is a basic sysadmin skill, so you might as well do it now.
In MacOS and Linux
On an MacOS machine you’ll normally access the command line via Terminal.app - it’s in the Utilities sub-folder of Applications.
On Linux distributions with a menu you’ll typically find the terminal under “Applications menu -> Accessories -> Terminal”, “Applications menu -> System -> Terminal” or “Menu -> System -> Terminal Program (Konsole)”- or you can simply search for your terminal application. In many cases
Ctrl+Alt+T will also bring up a terminal windows.
Once you open up a “terminal” session, you can use your command-line ssh client like this:
ssh user@<ip address>
If the remote server was configured with a SSH public key (like AWS, Azure and GCP), then you’ll need to point to the location of the private key as proof of identity with the
-i switch, typically like this:
ssh -i ~/.ssh/id_rsa [email protected]
A very slick connection process can be setup with the
.ssh/config feature - see the “SSH client configuration” link in the EXTENSION section below.
On recent Windows 10 versions, the same command-line client is now available, but must be enabled (via “Settings”, “Apps”, “Apps & features”, “Manage optional features”, “Add a feature”, “OpenSSH client”).
Alternatively, you can install the Windows Subsystem for Linux which gives you a full local command-line Linux environment, including an SSH client - ssh.
Regardless of which client you use, the first time you connect to your server, you may receive a warning that you’re connecting to a new server - and be asked if you wish to cache the host key. Yes, you do. Just type/click Yes.
But don’t worry too much about securing the SSH session or hardening the server right now; we will be doing this in Day 3.
For now, just login to your server and remember that Linux is case-sensitive regarding user names, as well as passwords.
You’ll be spending a lot of time in your SSH client, so it pays to spend some time customizing it. At the very least try “black on white” and “green on black” - and experiment with different monospaced fonts, (“Ubuntu Mono” is free to download, and very nice).
It’s also very handy to be able to cut and paste text between your remote session and your local desktop, so spend some time getting confident with how to do this in your SSH client and terminal.
To log out, simply type
exit or close the terminal.
LOGIN TO YOUR SERVER
Once logged in, notice that the “command prompt” that you receive ends in
$ - this is the convention for an ordinary user, whereas the “root” user with full administrative power has a
# prompt (but we will dive into this difference in Day 3 as well).
Here’s a short vid on using ssh in a work environment.
GENERAL INFORMATION ABOUT THE SERVER
lsb_release -a to see which Linux distro and version you’re using. lsb_release may not be available in your server, as it’s not widely adopted, but you will always have the same information available in the system file os-release. You can check its content by typing
uname -a will also print the system information and it can show some interesting things like kernel version, hardware platform, etc.
lshw can give some detailed information on the hardware configuration, and there’s a bunch of switches we can use to filter the information we want to see, but it’s not the only tool we use to check hardware with. Some of the used commands are:
lscputo display information about the CPU architecture
lsblkto list block devices
lspcito list all PCI devices
lsusbto list USB devices
MEASURE MEMORY AND CPU USAGE
MEASURE DISK USAGE
MEASURE NETWORK USAGE
You will have a general idea of your network interfaces and their IP addresses by using
ifconfig or its modern substitute
ip address, but it won’t show you bandwidth usage.
But if you want more info on that traffic,
sudo iftop -i eth0 is a nice display. Change
eth0 for the interface you wish to capture traffic information. To exit the monitor view, type
q to quit.
POSTING YOUR PROGRESS
Regularly posting your progress can be a helpful motivator. Feel free to post to the subreddit/community or to the discord chat a small introduction of yourself, and your Linux background for your “classmates” - and notes on how each day has gone.
Of course, also drop in a note if you get stuck or spot errors in these notes.
If this was all too easy, then spend some time reading up on:
- What is swap and swap space?
- How Linux deals with out-of-memory?
- How Do I Find Out Linux CPU Utilization and Usage?
- How do I find out Linux Disk utilization and I/O usage?
- 20 Best Linux Bandwidth Monitoring Tools for Network Analysis
- Comparing CENTOS and Ubuntu for servers
- How to Use PuTTY on Windows
- Puttygen command line on Linux - SSH key generator
- SSH client configuration
- A Beginners Guide to SSH
- Linux command to display your hardware information
- See if your hardware is Linux-compatible on Hardware for Linux and DistroWatch
- What is Load Average in Linux?
Some rights reserved. Check the license terms here