This is an old revision of the document!
Table of Contents
Create your Own Linux Image
Install VirtualBox first
Download it directly from https://www.virtualbox.org/ for your host operating system (the operating system on your computer, e.g. Windows or Mac OS).
Use Vagrant to Pull the Basic Ubuntu Image
Adapting the automatic screen resolution with the official Ubuntu 18.04 image running on VirtualBox VM is a problem. Also copy-paste between Windows and the Ubuntu VM sometimes does not work.
The easiest way for me is to use a vagrant Ubuntu Desktop image provided by the user “peru”: https://app.vagrantup.com/peru/boxes/ubuntu-18.04-desktop-amd64
It already provides several features which make life easier (some mentioned above).
Install Vagrant on your local machine.
Create a meaningful directory, e.g. my-ubuntu
.
Download the vagrant file below into my-ubuntu
by clicking on the link above the code text.
- vagrantfile
Vagrant.configure("2") do |config| config.vm.box = "peru/ubuntu-18.04-desktop-amd64" config.vm.box_version = "20200401.01" end
Open a command line interface (CLI) such as Windows cmd
in the directory my-ubuntu
. If you type dir
you should see the file vagrantfile
.
On the command line execute vagrant up
. This will pull the Ubuntu Desktop image named in the Vagrant file.
This will start the Ubuntu image in the VirtualBox VM.
Changes in the VM
Upgrade the Installed Software
Log in with vagrant / vagrant
sudo apt update sudo upgrade update
Additional Keyboard Layouts
Log in with vagrant / vagrant
The default keyboard layout is English en
. Use the “Settings” App (the gear symbol) to add additional keyboard layouts. You should install at least German (no dead keys). In languages like French with accents above vowels dead keys are used to modify letters, e.g. with a dead key layout pressing `
followed by a
yields à
. In plain German it is annoying to be forced to press two keys, namely an accent followed by a black, to get the accent only. The modifier no-dead-keys
eliminates this behavior. If an accent key is pressed the accent is typed immediately.
After adding more layouts a keyboard selection dropdown menu occurs on the top right of the desktop. Choose your appropriate layout (e.g. en or de).
Add User studi
Log in with vagrant / vagrant
Execute sudo adduser studi
Choose the password linux123
and user name studi
. Leave the other fields empty.
Endow the user studi
with comprehensive rights by adding him or her to the relevant user groups:
sudo usermod -a -G sudo,dialout,adm,cdrom,dip,plugdev,lpadmin,sambashare studi
Install Anaconda3 Python Distribution for User studi
Log in with studi / linux123
Source: https://docs.anaconda.com/anaconda/install/linux/
# On Debian based systems: sudo apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
In your browser go to https://www.anaconda.com/distribution and choose Linux Distribution.
Download the lastest Linux installer! Currently (2020-04-17) it is:
https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
You can also use the command wget
is a Linux terminal to download the installer. Open a terminal in the Linux VM pressing <Ctrl>-<Alt>-T
cd ~/Download wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh sh ./Anaconda3-2020.02-Linux-x86_64.sh
Read and accept the license and answer the following questions with yes.
This will install the Anaconda3 Python distribution into the location /home/studi/anaconda3
Conda Environment
If you chose “activate conda environment” during anaconda3 installation it modifies the command line prompt, i.e.
(base) studi@linux:~$
See: https://askubuntu.com/questions/1026383/why-does-base-appear-in-front-of-my-terminal-prompt
Thonny
Log in with studi / linux123
Thonny is a light weight Python editor for beginners: https://thonny.org/
The Thonny version in the Ubuntu 18.04 Software Center is too old.
There are several ways to install the latest version of Thonny, e.g.:
- Download the latest Thonny bash installation script and execute with bash:
sh thonny-3.2.7.bash
- If Python3 is installed (e.g. part of Anaconda3) you can execute:
pip install thonny