Switching from macOS to Linux/Printable version

Switching from macOS to Linux

The current, editable version of this book is available in Wikibooks, the open-content textbooks collection, at

Permission is granted to copy, distribute, and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 3.0 License.



To install Ubuntu, first get it from Ubuntu's download page. You have the choice between Desktop and Server versions. If you are familiar with the command line and intend to run Ubuntu as a server, download the server version first. If you are unfamiliar with the command line, you can install the GUI while you learn it. Instructions to do that appear later.

Ubuntu is released twice a year, once in April, once in October. These versions are supported for 9 months. Every 2 years, Ubuntu releases a "Long Term Support" (LTS) version that is supported for 5 years.

The version matches the year, month, and day. Ubuntu 16.04.03 means it was released in on April 3rd, 2016. Ubuntu 17.10.1 was released on October 1st, 2017.


Virtual MachinesEdit

VirtualBox is free so you can get started with this right now. There are many instructions online that discusses how to do this. The steps are basically as follows.

  • Create a new VM
  • Attach the downloaded iso
  • Start the VM
  • Run the installer

VMware Fusion is easier. Just select "Install from disc or image" and drag the iso on top of it.

Boot CampEdit

Installing Ubuntu on a Mac

Non-Mac HardwareEdit

Ubuntu's desktop tutorial. Ubuntu's server tutorial. Ubuntu's server installation guide.

Forgotten PasswordEdit

If you forget your password you must reboot and enter Recovery Mode. If you are at the login screen you can reboot by pressing control-alt-delete (control-option-delete). Hold down the shift key as soon as the computer restarts. Almost immediately you will enter the GNU GRUB menu. If the computer wont even boot to the GRUB menu, you must boot to a CD's GRUB menu.

Once booted to the GRUB menu, choose "Advanced options for Ubuntu", then "recovery mode", then "Drop to root shell prompt". Type these commands to make the disk writable.

mount -o remount,rw /
mount --all

Then you can change a password using passwd. User information is stored in /etc/passwd and passwords are stored in /etc/shadow. /etc/passwd needs to have 644 permissions and /etc/shadow must have 640 permissions. Home folders are in /home/. Group information is stored in /etc/groups.

Software UpdateEdit

Finding your versionEdit

You can find out the current version of your OS with this command.

cat /etc/lsb-release

This is what it printed.


You can also view the version of the Linux kernel by running this command.

uname -a

This is what it printed.

Linux ubuntu 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

According to the Linux Kernel Archives the latest version at the time of writing is 4.15.


The first thing you want to do after installing (assuming your networking is working) is to update. To update run these commands.

sudo apt-get update

This command updates your local copy of available software that you can install. Run this command periodically to make sure your source list is up-to-date.

When I first installed 16.04 and ran apt-get update I got an error that said the following.

The repository 'cdrom://Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801) xenial Release' does not have a Release file.

It's pretty annoying when an error appears right out of the box, but don't let it stop you. I fixed it by searching for the error on the internet and I found this page that says to edit /etc/apt/sources.list and comment out lines that began with "deb cdrom". That fixed the problem for me.


Next, run this command to upgrade the packages already installed on your computer.

sudo apt-get upgrade

The Ubuntu server guide says to run this command to upgrade Ubuntu server.

sudo do-release-upgrade

On other Linux versions you would run this command instead.

sudo apt-get dist-upgrade

Viewing what you have installedEdit

apt list --installed

This will print a long list of all of the software installed on your computer.

Getting new softwareEdit


I setup SSH first because I'm most familiar with the Mac, so I prefer to work from a Mac, so I prefer to login to Linux using Mac's Terminal.app.

SSH isn't installed by default. You can install it using the following command.

sudo apt-get install openssh-server

You could also install it using the tasksel command (see below).

To check it's status run this command.

service ssh status

Once it's running you can ssh into your Linux box by first getting the IP of your Linux computer by running this command.

ip addr show

Then on a different computer (like your Mac), you can ssh in by running this command.

ssh name@yourip

If you are using a virtual machine, now would be a good time to make a snapshot.


Virtualmin GPL is an extension of the Webmin web console that is used to configure a Unix based server using a web browser. I intend on using a web console as a crutch so that I can get up and running as quickly as possible. I intend on learning how to configure everything using the command line, but getting a production server running will give me a reason to learn the command line.

I choose Virtualmin for one reason, it safely backs up MySQL databases. I didn't see any other free web consoles . I don't have my own scripts to do this, so I'm relying on this product to do it for me. Virtualmin also installs Webmin and LAMP, which I also plan to install. So this just does it all for me.

To find the latest instructions see the Virtualmin instructions.

At the time of this writing, the instructions were to run these commands.

wget http://software.virtualmin.com/gpl/scripts/install.sh
sudo /bin/sh install.sh


Virtualmin will install Webmin. If you don't want Virtualmin but do want Webmin, you can install it with the following commands.

Add the webmin source.

sudo nano /etc/apt/sources.list.d/webmin.list

Add this line.

deb http://download.webmin.com/download/repository sarge contrib

Then run these commands

sudo wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc
sudo rm jcameron-key.asc
sudo apt-get update
sudo apt-get install webmin

Then you can login and configure your server using a web browser at https://yourip:10000.


This command is a short cut to installing many things, based on the task. Run it without any arguments for a list.

sudo tasksel

In my case I selected "Samba file server".

To see what a task is actually installing, look at /usr/share/tasksel/descs/ubuntu-tasks.desc.

I could also install a specific task by naming it.

sudo tasksel install lamp-server

And I could remove it using the remove command.

sudo tasksel remove lamp-server

After installing LAMP, it is recommended that you secure it.

Desktop GUIEdit

If you really want to install the GUI on Ubuntu Server type one of the following.

For only the desktop and not the extras.

sudo apt-get install --no-install-recommends ubuntu-desktop
sudo reboot

To remove:

sudo apt-get remove ubuntu-desktop
sudo reboot

To install the desktop and all of the extras (Firefox, LibreOffice, mp3 player).

sudo tasksel install ubuntu-desktop
sudo reboot

To remove:

sudo tasksel remove ubuntu-desktop
sudo reboot

The rest of this book is going to assume you don't have Desktop installed.

Listing softwareEdit

For an absolutely gigantic list of software that you can install run this command.

apt-cache search .

You can also substitute a keyword to find software with that keyword.

apt-cache search lamp

Ironically, this doesn't list Apache, MySQL, or PHP. Even more ironically a web search led to old documentation that didn't work either. I had to go to the Official Ubuntu Documentation, find the latest Server documentation (16.04 LTS), and look for "LAMP" there. The page there said to use tasksel.

System Preferences (Desktop)

The following is a list of some of Apple's System Preference Panes and where you will be able to find the same settings in Ubuntu Desktop. Most of them are self explanatory and are available in Ubuntu Desktop "System Settings" application, which is found in the Dock or in the Gear menu at the top right of the screen.

Date & TimeEdit


Desktop BackgroundEdit

"System Settings", "Appearance" to set the background image.


"System Settings", "Brightness & Lock" to set the lock time and password requirements.

Ubuntu's ships with only one basic screensaver that locks the screen. If you want a more screensaver follow these screensaver installation instructions.



"System Settings", "Display" to change resolution. The big difference between this and Mac is that you have to click "Apply" to actually change the resolution. This won't be obvious if you install Ubuntu in a VM that has a very small screen size (800 x 600) because you won't be able to see the "Apply" button.



Night ShiftEdit

Read about it here.


The Ubuntu Dock is called the Launcher.

"System Settings", "Appearance", "Look" tab allows you set it's size. The "Behavior" tab allows you to Auto-hide the Launcher. There are other ways to configure the Launcher appearance.

Energy SaverEdit

Sleep displayEdit

"System Settings", "Brightness & Lock" to set the lock time.

Sleep computerEdit

"System Settings", "Power" allows you to suspend the computer, but I'm not sure what that means.

Sleep hard drivesEdit

I don't see settings for this.

Wake for Network AccessEdit

Read about it here.

Start up after power failureEdit

Power NapEdit

Power On/WakeEdit

Power Off/SleepEdit



Default Web browserEdit

"System Settings", "Details" pane, "Default Applications" tab allows you to change the default web browser, email, calendar, music, video, and photo applications.


Key Repeat & Delay Until RepeatEdit

"System Settings", "Keyboard"

Modifier KeysEdit



"System Settings", "Keyboard"

Input SourcesEdit

"System Settings", "Text Entry"


Add bluetooth deviceEdit

Mouse & TrackpadEdit

Scroll DirectionEdit

This seems to be a grey area. You can read about it here and here

Tracking SpeedEdit

"System Settings", "Mouse & Trackpad"

Add bluetooth deviceEdit


Printers & ScannersEdit

"System Settings", "Printers".

For scanners, see this, this or this.

Security & PrivacyEdit

Screensaver PasswordEdit

"System Settings", "Brightness & Lock"






Startup DiskEdit

Time MachineEdit

Users & GroupsEdit

System Preferences

Energy SaverEdit

Sleep displayEdit

"System Settings", "Brightness & Lock" to set the lock time.

Sleep computerEdit

"System Settings", "Power" allows you to suspend the computer, but I'm not sure what that means.

Sleep hard drivesEdit

I don't see settings for this.

Wake for Network AccessEdit

Read about it here.

Start up after power failureEdit

Power NapEdit

Power On/WakeEdit

Power Off/SleepEdit




Startup DiskEdit

Time MachineEdit

Users & GroupsEdit