Guide to running Linux on your own

You are currently running Windows and want to try out Linux, but don’t know much about running other operating systems? Want the easy answer? Jump to Installing Ubuntu in a VMWare Workstation Player

Want to know how deep the rabbit hole goes? This page contains a lot of extra information that might be interesting to some, while completely unnecessary for most.

Picking a Linux distribution

When Windows and macOS just have a single distribution, Linux is mostly open source and has lots of distributions. Mapping all of them is nearly impossible, but there are some major key players out there whose distributions are worth keeping an eye out for.

Major Linux distributions: https://distrowatch.com/dwres.php?resource=major

There is no way to say witch Linux is the most popular, as there is no one statistic. There is also no best Linux distributions, it’s all relative.

The only answer that most people agree upon is that starting from Ubuntu or something based on this is the easiest. It’s well supported and has a large group of users.

While Ubuntu is a decent distribution and works nicely (you should definitely check it out), my recommendations are:

  • Kubuntu – This is a flavor of Ubuntu, meaning you get the great compatibility and support resources, but has a different desktop environment.
  • Linux Mint – This is based on ubuntu (not a flavor), so it still has the great compatibility and support. This is built to offer the easiest transition for Windows users, so it should feel quite comfortable.

The more savvy ones usually grow out of Ubuntu distributions to different directions. Fans and more hardcore users tend to look towards Arch, and Gentoo, but also EndeavorOS. Those who need good compatibility and don’t want to mess around too much tend to go towards Kubuntu and Linux Mint. Those who want something different but still simple often look towards Fedora, elementary, MX and Pop!_OS.

Which Linux distributions do your teachers use?

On the lab computers, we have installed various versions of OpenSUSE. This is because of enterprise compatibility and support. It’s not the Linux I would recommend for everyday use, especially for beginners.

Your teachers and teaching assistants are mainly using either Ubuntu or Kubuntu (a flavour of Ubuntu). Some of us used Mint as our previous distribution.

Guest lecturer that we use from time to time is running Arch Linux.

Most of us also are running various microcomputers and servers running CentOS, Raspian, Ubuntu Server, etc.

Various ways of running Linux

To run Linux on your own machine, there are lots of different ways. Some easy, some hard and can potentially break your machine (temporarily, until the software is fixed).

Running in a virtual machine

This is the simplest way of doing it. It will retain your current system fully, while only installing some additional drivers such as a network driver for the VM. The software will create a virtual computer inside your host operating system and share the resources of your computer to run it.

+ It doesn’t have any long-term effects and can be easily removed from your system.
+ It creates a sandbox in your device that you can play around with. No worries if you break it.
+ You can easily snapshot the current state of the machine and restore to a previous snapshot.
+ Virtual machines can be copied over to other computers as well as put into remotely accessible servers
+ No need for an extra computer or risky alterations to the host operating system
– Slower than running on native hardware
– Runs better on specific hardware that has virtualization features
– Requires more powerful hardware, as your computer has to run both your host and the virtual machine.

Primary free software options for type 2 hypervisors:

Installing Ubuntu in a VMWare Workstation Player

Teacher’s note: Even I’ve written guide is written for Ubuntu, I’d recommend checking out Kubuntu and Linux Mint as well before downloading Ubuntu. Some might prefer the user interface of those over Ubuntu.

Requirements:

  • You need to have around 15 GB of free space for the virtual machine on your hard drive, preferably on SSD
  • For the duration of running the VM, you should preferably allocate 4 GB of your system RAM to it (meaning your computer should have a minimum of 8 GB). It will still work with a minimum of 2 GB, but the performance will be worse.
  • Preferably a quad-core processor with 2 cores allocated to the VM, though dual-core is also fine.
  • Processor needs to support virtualization and it needs to be enabled. Note: if you don’t have virtualization support, you can try Virtualbox. It behaves quite similarly to this.

Before we can install Linux, we need to have the software which will create a virtual machine for us and download the Linux installer.

  1. Download VMWare Workstation Player: https://www.vmware.com/products/workstation-player.html
    Mac users should be able to use VMWare Fusion for free as long as it’s a non-commercial use case.
  2. Install it. For course related use cases, we are using it as a non-commercial user, so it will be free.
  3. Download the Ubuntu Linux Desktop disc ISO: https://ubuntu.com/download/desktop
    It’s usually recommended to download LTS version of the operating system.

Now we are all set to start installing Linux.

NB! Make sure to be plugged in when using a laptop or at least have plenty of battery.

Launch VMWare Workstation player. Create a new virtual machine.

For automated install, select the ISO image option. Browse to the Linux ISO you downloaded earlier. This way VMWare will take care of the setup completely.

For manual install, select “I will install the operating system later”. This way you can go through the full setup experience. This process will not be described in this tutorial. Just 2 tips: select 64-bit Linux and then attach the ISO later.

Now you will be required to set up your account in the Linux you’re about to install. This page you can fill with your own info.

Next up, you need to select where the data files for this virtual machine will be stored.  2 things to note here

  1. It’s recommended to store it on an SSD for faster speed
  2. It will take roughly 10~15 GB of memory in that location

Next up, you need to select the maximum drive size for your virtual computer. The default settings are fine for most.

Note 1: This is the maximum size. Initially after installation, it will be roughly 10 GB. The size of the actual files will grow as you use more space on the virtual Linux machine, up to the maximum size. You can make it smaller, but i do not recommend anything less than 15 GB.

Note 2: Resizing the disk to a larger size later is possible, but it needs to be done both on the hypervisor settings and then disk needs to be re-partitioned in the virtual operating system.

Next up is the overview of what you’re about to create. If you missed something or want some last minute change or checkup, this is where to do it. Typically you don’t need to do anything here.

Note: You can see how much ram and processor cores this machine will use. If you click “Customize hardware”, you can also change that. Minimum that should still work is 2 GB and 1 core, however for a decent experience I’d recommend 4 GB and 2 cores.

  1. These resources will not be occupied while the virtual machine is suspended or shut down.
  2. These resources are shared. You don’t actually lose that much when running the machine, it’s the maximum that the machine can use if fully stressed.

Now the virtual machine will power itself on and start the installation of the operating system. You will be asked for a few configuration options in the beginning of the setup.

For how to set up the hard drive, as long as you are running it in the virtual machine as instructed per this guide, you can use the default (wipe everything). Do not use this setting if you are setting it up for dual-boot, as that will wipe your other operating system and its data.

Now you need to wait for the install complete. Depending on your computer, it should be roughly 10 minutes. Once done, you will be asked to restart the computer, after which, you can start using the system.

Next up

  1. Go through the initial welcome wizard. You don’t need to associate it with any of your accounts, set up livepatch etc.
  2. It will prompt you do to the updates. Do it!
  3. Go play around and also start the installation process for software required for the course.
  4. Recommended: Set up a shared folder between your computer and the virtual computer.

Hint 1: If the virtual machine doesn’t fill the entire window, then resize the window manually and it should readjust itself. Then you can maximize it again. If it doesn’t work, make sure that VMWare Tools is installed in the virtual machine.

Hint 2: To release your mouse, hit ctrl + alt.

Setting up shared folders

In order to make your work smoother, you may want to create shared folders between your host and guest systems. This way you can access the same files in both operating systems.

To do this, choose Player -> Manage -> Virtual Machine settings. Open the second tab (Options) and select shared folders. Turn the function on and add the folder(s) you need.

Under linux, you will find all of the shares from  /mnt/hgfs/ .Hint: If the location is inconvenient, you can create a shortcut (symbolic link) to somewhere else. To create it to the desktop based on my example, type  ln -s /mnt/hgfs/programming_1 ~/Desktop/programming  into the terminal. This will create a shortcut folder called programming  on your desktop.

NB! Known bug! After you restart your virtual machine, shared folders will no longer show. There is a temporary and a permanent solution to this.

Temporary: Go back to the shared folders setup. Turn it off and then on again. This works until you restart the virtual machine.

Permanent (more comlicated): You need to edit the  fstab   file under Linux. Open  /etc/fstab  in a text editor with root privileges (e.g. sudo nano /etc/fstab ). Go to the end of the file and add vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0 .

Information about the fix: https://communities.vmware.com/t5/VMware-Fusion-Discussions/mnt-hgfs-does-not-get-mounted-after-reboots-for-shared-folders/td-p/2889090

Documentation: https://docs.vmware.com/en/VMware-Workstation-Pro/15.0/com.vmware.ws.using.doc/GUID-AB5C80FE-9B8A-4899-8186-3DB8201B1758.html

Running off a USB drive

This is most likely the least popular option. It means that you install an operating system on a USB drive.

Linux allows you to run it of a USB drive natively. This is the default behavior to allow you to test Linux and possibly also fix some issues on the device. However any modification will typically be erased. To avoid this, many bootable USB creators allow you to create persistent storage. This will allow you to permanently use the storage on the drive and install programs that will remain on the next boot.

To run a thing like this, the computer boot device needs to be altered to USB. This can be done using the BIOS/UEFI or the quick boot menu provided by them. This is often unavailable on corporate machines due to security concerns.

+ You can run your own preferred software on any machine that allows you to boot from USB
+ No need to deal with boot loaders or partitioning hard drive space. Everything is contained to your drive.
– Often unavailable on properly configured corporate computers because it can bypass their security
– USB memory sticks are horribly slow and unreliable.

Dual-booting

This method will install a secondary operating system on your computer. It is just like in the computer class – when powering up or restarting the computer, you are greeted with the operating system selection – do you want Windows or Linux?

This is usually the preferred option for people who use multiple operating systems for prolonged time (e.g. Linux for work, Windows for entertainment).

Even though modern Linux installers are quite friendly and offer to install as a second operating system, it is still very easy it is to break your existing operating system and/or lose your data, no tutorial will be provided. You have been warned!

+ The operating systems are independent of each other
+ There is no performance penalty as you are running a single OS directly on the hardware
+ There are a lot less compatibility issues and quirks running on native hardware.
– Need to reboot to switch operating systems
– Accessing other operating system files may be difficult due to file system support
– Windows tends to be rude and break everything twice a year when it updates. It likes being the only child in the family.
– need to re-partition your hard drive and keep a separate boot loader