Linux
- Linux is an open source operating system.
Introduction †
Features †
- Open source
- ...
When to use Linux? †
- If you don't like Windows or Mac.
- Many of robot SDK are provided for linux.
- ROS (robot operating system) is designed for Linux (Ubuntu).
Which distribution is better? †
There are many distributions of Linux, for example Ubuntu, Debian, Turbo Linux. They are using the same Linux core, but consist of different packages.
Recommended distribution †
- Ubuntu: Since ROS (robot operating system) is developed on Ubuntu, you can install ROS from binary repository (i.e. very easy). Recently Ubuntu seems to be most common Linux distribution, so many programs for Linux are tested on Ubuntu, including proprietary software (closed source programs made by companies).
- Linux Mint: Linux Mint is developed on Ubuntu. Mint uses the same binary repository as Ubuntu, but also provides some different UI (user interface) packages. So, you can still install ROS from the binary repository. If you do not like the UI of Ubuntu, Mint is alternative.
Recommended Ubuntu version †
There are versions of Ubuntu. LTS (long term support) version is highly recommended. There are Trusty (14.04) and Xenial (16.04), Bionic Beaver (18.04), and Focal Fossa (20.04) of Ubuntu LTS versions. There are corresponding versions of Linux Mint. Selecting a version depends on what you want to do with Ubuntu; some libraries do not support newer versions, and others do not support older versions. Note that each version has an end of life (support and maintenance are terminated). Just learning Linux and programming, newer might be better. WSL (Windows Subsystem for Linux) is also an option. If you want to work with a project where the standard platform is Bionic, then using Bionic is a best choice to join. Discuss with your team mates and supervisors to choose a best distribution for your project.
How to install? †
There are several ways to install Linux.
- Usual OS installation (single boot).
- Download a binary image (ISO) of Linux.
- Make an installer DVD or USB.
- Install the OS from DVD/USB.
- Dual boot.
- You can install two or more operating systems in a single PC. e.g. Dual boot of Linux and Windows.
- Virtual machine.
- You can install Linux on VMWare or VirtualBox. These are virtual machine platform, i.e. you can install a new OS virtually on the OS that you have now.
- Windows Subsystem for Linux (WSL).
- This is a new way, available on Windows 10 (version 1703) or newer.
- Ubuntu is recommended.
- For GUI, you need to install an X system.
Pros and Cons †
- Usual OS installation (single boot).
- Pros
- Can fully use the PC performance and devices.
- Cons
- Need to remove the existing OS.
- Pros
- Dual boot.
- Pros
- Can fully use the PC performance and devices.
- Cons
- There is a risk of destroying your original OS.
- Need to restart the computer to switch the OS.
- Pros
- Virtual machine.
- Pros
- Easy to start.
- Can keep the existing OS.
- Can use simultaneously the existing OS and Linux.
- Cons
- Cannot fully use the PC performance.
- Device access might have problems, such as cameras.
- Even if you can use a device, the performance might be low. For example camera FPS would be reduced.
- Use much memory.
- Pros
- Windows Subsystem for Linux (WSL).
- Pros
- Easy to start.
- Does not use memory as much as virtual machines.
- Cons
- Device access is limited.
- Camera seems not to be supported as of 2018-04-03.
- Pros
How to use? †
Most of Linux provides good GUI (graphical user interface). You would be able to use it without much explanation.
Linux also provides CUI (character user interface). Linux CUI is more powerful than GUI. On CUI, you can do almost anything, while on GUI, some functions are limited. So, let's learn CUI.
Learning CUI †
There are several tutorials and courses to learn command line interface of Linux. For example:
- Learn the Command Line - Codecademy: Interactive course of Linux command line where you can use virtual terminal online. So you can practice command line on browser of any OS.
- LinuxCommand.org: Thorough tutorial of command line.
- There is also a list of Linux command resource: https://www.pcwdld.com/linux-commands-cheat-sheet
- ...
If you know any good ways to learn Linux command line, let us know through the comments below.
You can also practice Linux commands by yourself. Open an terminal, and practice the following commands:
- Basic commands
- ls
- cd
- pwd
- mv
- cp
- rm
- less
- cat
- ssh
- scp
- touch
- chown
- chmod
- chgrp
- apt-cache
- apt-get