Users looking to install Ubuntu 16 and higher without any X11 server or graphical user interface of any kind often turn to the minimal ISO, but it requires an Internet connection to install. While it’s possible to use this to open immediately up to a CLI login screen at a virtual console, it’s not ideal because it requires network connectivity, and therefore users may wish instead to plan for some sort of offline installation. Installing a local form of Ubuntu Server edition is the easiest way to accomplish this. Even though Ubuntu Server edition is geared toward big iron system administrators, the underlying operating system and kernel structure is identical to regular Dash-powered Ubuntu.
Anyone who installed Lubuntu with the alternate ISO image is already familiar with the installer Ubuntu Server uses. Those who aren’t still shouldn’t find it difficult to use. Since it uses the ncurses interface, it’s easy to control with the standard arrow keys on an attached keyboard. It’s also similar to alsamixer, Midnight Commander and the ranger file manager, so users with terminal experience should have no problem installing it.
Installing Ubuntu Server Edition
Access https://www.ubuntu.com/download/server from a browser on a machine that’s currently connected to the Internet. You may even do it from a bootable partition on the system you’re going to install Ubuntu Server. Machines configured to work only with virtual consoles can still access this page with the w3m CLI browser. Select whether you’d like to use the LTS image or not, and click on the orange download button next to the choice you’ve made.
Your browser should automatically start downloading the image, but it could take a few moments because it is rather large. Ubuntu’s download defaults to the amd64 architecture, but a link is also provided for 64-bit ARM processors, which you might need if you’re indeed working with big iron equipment. Desktop installs of Ubuntu Server seldom need this.
Once you’ve successfully downloaded the image, you’ll want to make sure it’s unharmed before using it. Ubuntu’s page should provide you with an MD5 checksum, which can check from inside Linux with the CLI prompt. Navigate to your downloads directory with cd ~/Downloads and then type md5sum and the name of the image, which should be something like ubuntu-16.04.1-server-amd64.iso, depending on the version and architecture you’ve selected. Assuming the numbers check out, you can now either burn the image to an optical disk or some form of USB storage. It’s much easier to use USB storage, because the image is likely to be quite large.
You can configure a bootable USB memory stick or an SD card to start your installer. All forms of SD cards large enough, including microSDHC and microSDXC, should work fine. This allows you to easily boot the image from a laptop with an SD card slot in the side. Assuming you have a completely empty unmounted drive at /dev/sdd, because this process will almost unquestionably destroy any file system on it, type the following command:
sudo dd if=ubuntu-16.04.1-server-amd64.iso of=/dev/sdd bs=8M
Replace the image name with the ISO file you’ve downloaded, and replace /dev/sdd with the name of your device, always double-checking before you push the enter key. Once you’ve returned to the CLI prompt and ejected the media, you’re ready to begin the installation. Open the BIOS settings screen on the machine you’re installing from, set it to boot from removable storage and then save your settings. Reboot it, and you should find yourself in the text Ubuntu installer.
You’ll be asked to configure your keyboard and regional settings, which should proceed very similarly to the graphical installer, albeit without any images. More than likely, you’ll find it’s actually faster since there’s comparatively little to load. Follow along with the prompts and partition your volume, keeping in mind that you’re going to virtually erase data on anything you overwrite. Then again, you’re more than likely looking for a fresh installation in this case anyway.
Eventually, the installer will warn you that you’ve failed to acquire an IP address via DHCP, which is because you’ve been working without a network connection. Use the arrow keys to select the [Accept] box and push the enter key to continue installing. You can configure your file and your IP address later, if you’re going to access the Internet from the command line.
Doing this is much easier than installing Ubuntu and then removing packages, plus it gives you the option of installing X11 later on if you find you do need it. There are a handful of packages you might want to install in order to make your installation a bit more comfortable as well, which aren’t installed by default.
The aforementioned ranger package is a great file manager that works from your terminal that features vi-like key bindings. You’ll find that Ubuntu Server shipped with vim and GNU nano, so you won’t have to worry about a text editor. Installing the ranger package will more than likely come with the w3m Web browser, but you can install it separately with sudo apt-get install w3m if you wanted to use a different file browser instead. Using sudo apt-get install unhide might also be useful if you’re interested in using a terminal security program. The ufw firewall software should work as well regardless of the fact that you don’t have access to an X11 environment.
Keep in mind that you’ll still be able to multitask through some of the bash shell features as well as the virtual consoles. Hold down Ctrl, Alt and F1-F6 to switch between the six virtual consoles that Ubuntu Server gives you to work with. When a task is running, you can hold down Ctrl and Z to pause it, then type bg and push return at the bash prompt to send it to the background. You can also type fg and push enter to bring it back to the foreground.