Basic Linux Installation Guide

From The Maceys in California

Before We Begin

There are lots of Unix distributions that are available. The all start with the same basic parts and then create distributions that tend to focus on a particular audience. Some are seriously minimal others are more comprehensive. The first separation is Redhat vs Debian variants. Pick one. They each have a specific way of doing things. This is more important when administering rather than just using. The examples below are all Debian based. Next is the desktop. This obviously doesn't matter if the system is a server version. The two big ones are KDE and Gnome. I tend to prefer KDE but can easily use either.

My current choices are Ubuntu for the VMs and Kubuntu or Zorin the physical one.

Installing Linux systems

The installation process for both the desktop physical machines and Linux VMs is pretty straight forward. The idea is to get a vanilla basic installation that can be built on to. The process is similar doing it on a physical machine as it is on a VM.

Setup a Bootable USB key

If you are installing on a VM, skip on down.

Look to see if the desired distribution has been loaded onto the Ventoy USB key.

If not download from a reputable source and copy it to the key.

Note: The Ventoy key will mount as two drives on Windows. Ignore the boot partition and copy the distribution to the other once

Boot the machine from the key.

Or Create a VM from the Proxmox Console

If you are not creating a VM skip on down.

Connect to PVE and verify distro

Open the Proxmox GUI: http://pve.lan:8006

Before creating the VM make sure that the desired distribution in in the ISO library. Select pve on the leftmost menu panel. This will display all of the VMs and storage objects. Select local(pve). Select ISO images to display the ISO library. If the desired image is there, continue to create a VM. If not select local (pve) from the left panel, click on ISO Images and the upload. Select the distribution ISO image from the local machine to upload to the library.

Create the VM

Click on the Create VM button on the upper right.

The system will present a sequenced system definition.

General - The defaults are fine. Change the ID if desired.
OS - The defaults are correct. Pick the distribution in the highlighted box.
System - The defaults are fine. Change the Graphics card to one of the VirtIO to experiment.
Disks - The choices are fast1, fast2 and fast3. They are about the same except for space. This is root disk for the install. 50-100GB are good choices.
CPU - 1 socket and set the cores appropriately. 2 or 4 is typical. Scroll to the bottom of Type and select host.
Memory - Depends on the task. 2048, 4096 and 8192 are two, four and eight GB.
Network - Defaults are fine.
Confirm - Review, select Start on create box and click Finish.

The system will create the VM and start it up. Select the machine ID on the left panel and then go to the console for it.

Install the OS Distribution

A minimal install will work on server VMs. The complete set of tools that comes with the full distribution are not needed. It is nice to have a desktop display that can be run from the console, however. All of the Debian variants, including Ubuntu, Kubuntu and Zorin, run through the same basic steps to install

This is pretty much a case of answer obvious questions and then waiting for the install to complete.

Installation screen: Next 
Timezone: Next unless you want the machine to be elsewhere
Keyboard: Next
Installation mode: Select full for a desktop, minimal for a server VM
  Select Download and install updates: Next
In partitions, the disk is already selected, select erase: Next
Set the user and machine information. Since we are all friends, click on Log oin automatically: Next
Review the confirmation page and fix if necessary: Install
There will be a popup confirming that the disk contents will be destroyed, but we don't care: Install now

Now you can go away for a while. Don't panic, the progress stalls at around 90% for a while but everything is working correctly.

After the install completes, the system will need to reboot. 
Proxmox takes care to boot from the drive rather than the virtual CD: Done

The splash screen will appear and move on to configuring the system.

Note: The process for installing native Ubuntu has a few more options, particularly on formatting the disk. The process is pretty much the same though. DO NOT install with the ZFS option
Note: Kubuntu appears to stall at about 90%, but it is working fine.
Note: Zorin on my workstation completed with an error. It booted fine though.

After Installation Actions

Get the System Up To Date

In spite of selecting to install updates during the main installation, the non-OS packages don't get this treatment in the full install. Regardless, this step is a good idea.

sudo apt update
sudo apt upgrade

Install and Open Cockpit

Cockpit is a very useful tool for viewing and modifying a number of system configuration pieces. All of these can be changed with the installed tools, but Cockpit is an easy way to do them in one place. The main screen also shows system activity.

By default, the system will be assigned a DHCP address.

. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit

Open URL from a web browser:

 http://<ip address>:9090 or http://localhost:9090

Login with the user created on the install. After logging in, do a quick check, switch to administrative access and then open the terminal window. Change the network connection information and verify that the DNS server is set to 192.168.86.2

See Also

Cockpit Reference Install Cockpit on Ubuntu

Todo: Add the connection information to the Start.me section for connections


Install and Configure sshd (Minimal Install only)

Note: With Kubuntu user the local Konsole window as ssh is quite broken. The ssh server is still needed

The sshd server needs to be running so that you can login. This is required in order to cut and paste. This means that you need to type the commands manually.

sudo apt install openssh-server putty-tools -y
sudo systemctl start ssh

Input your password if prompted.

Note: With Kubuntu use the local Konsole window since ssh is quite broken

On Ubuntu continue configuring the system from an ssh terminal session

Note: With Kubuntu, skip this section

Install Putty

Click on the Application Launcher. Search for the putty app. Click on the selection to connect to ssh servers. Click on install in the installation popup. Once installed, just click on launch. Enter localhost as the Host Name. Accept on the Security Alert popup.

Alternatively you can connect from another system, use:

ip a

to get the systems IP address to use in your local putty session. After entering the host, click on Open.

Initiate putty to continue

Accept on the Security Alert popup.

Login using the credentials that you entered during the install. Now you can cut and paste.

Terminal Access using Kubuntu

If you have installed on a desktop it is easy to use the Konsole application.

Just a reminder. Multi line pastes fail when entering commands.

Fix sudo to not prompt for password

As a person who has worked as the root user since the Unix days, I find being prompted for a password when using sudo to get admin privileges.

Note: Do this as login user, NOT root.

Create a file for the user in the /etc/sudoers.d directory and add the following line to it. ${USER} matches the user created during the install. This needs to be done by the ordinary user or the steps will create a sudoers.d file for root. Do in two steps because you will be asked to authenticate assuming that this is probably the first sudo command of the session.

echo "${USER}    ALL=(ALL) NOPASSWD:ALL">${USER};chmod 400 ${USER};sudo chown 0:0 ${USER}
sudo mv ${USER} /etc/sudoers.d/${USER}

Give yourself superuser privileges before you continue.

sudo /bin/bash