Help! Linux!

You use classic Windows? A strange black box just popped up and you have no idea what to do next? First things first: don’t panic! You also have the option of changing to a graphical user interface on your RevPi Flat. You won’t be able to completely avoid spending at least a little time with the Linux terminal, however.

In this chapter we will explain some of the basics of Linux. You will also learn how to change to the graphical user interface.

A look at Linux’s roots

Linux was developed as a multi-user system. Originally various users worked on one Linux system that was managed by an administrator (user: root).

The file system of Linux is set up to accommodate this. Linux saves files in a directory tree. This begins with the root directory “/(rootfs)”.

Folder

Content

/

The root directory is at the very top of the hierarchy.

/bin

Programs that other users can use, e.g. shells.

/boot

All files that are required to boot the system.

/dev

Device files that are used as an interface to the hardware. Here you can also find entries for all hard drives and their partitions.

/etc

Configuration files that contain the settings for programs or basic system information.

/home

Home directory for all users. There is a separate folder here for every user that is comparable with the “My Documents” folder in Windows. The respective user has full access rights to this.

/lib

The system’s function libraries! Make no changes here!

/proc

Interface to the kernel. Every running program is listed here in a subdirectory. These files contain information about the current program status. There is also a directory structure with data about the kernel and the hardware of the system.

/root

Home directory of the system administrator (root). This is located in the root directory so that the administrator can access his files even if the access to other partitions is no longer possible due to an error.

/sbin

Programs of the system administrator.

/tmp

Temporary storage for files.

/usr

Installed software.

/var

Status information for the various programs. Log files are particularly helpful during troubleshooting.

/opt

(optional software) Commercial software or very large programs that are not directly part of the system such as KDE, Firefox, etc.

User management in Linux

If you log on to your RevPi Flat, you are automatically the user pi@RevPi in your home directory. You can recognize this by the ~ character behind your username. You have full access rights to all your data in your home directory. Here you can store and manage your data such as documents, videos or audio files.

However, for certain actions you require system administrator rights. Like for example shutting down the RevPi Flats .

If you enter the “shutdown –h 0” command as the user pi@RevPi, an error message will appear. Only the “root” user (system administrator) is authorized to shut down the system. There are historical reasons for this command. Linux was developed during a time when computers were still very expensive and several users had to share a system. To ensure that a user couldn’t accidentally shut down the system, thereby prematurely ending the work of another user, these rights were only assigned to the system administrator.

Because you can change all files with Linux (unlike with Windows), however, and thus are capable of completely destroying your system yourself, it is by all means a good idea to restrict the rights of a user in many cases.

It is not necessary for your RevPi Flat to be on at all times.

HINWEIS

Do NOT pull the plug for the power supply to switch off the device!

If the system is currently writing data to the eMMC memory, in rare cases this can lead to destruction of the eMMC memory’s file system so that it is no longer possible to even boot up.

 

In the following section we describe how to correctly shut down the RevPi Flat.

Sudo – the magic formula

CC BY-NC 2.5
CC BY-NC 2.5

By writing sudo in front of your command, you gain the rights of the administrator for only this command.

This allows you to access system files, install programs and, for example with “sudo shutdown –h 0”, properly shut down your RevPi Flat.

Tip!

Back up your data before performing critical actions on your system. This procedure is explained in the section “How to Back Up Data”.

If you want to get to know Linux a little better, we recommend the following website: http://www.selflinux.org/.

How exactly do I get to the GUI?

Have you decided that you want to have as little to do with the Linux terminal as possible?

Here you will find tutorials that show how you how to get to the graphical user interface with Linux or Windows.

Tip!

The graphical user interface uses at least 40 MBytes of RAM. If you only rarely need the graphical user interface or if you operate your RevPi Flat headlessly, we recommend booting it in the text console and only starting the graphical user interface when you need it.