English | Lietuviškai

Info


Communication


PEROPESIS LINUX OS USER MANUAL

The user manual for the Peropesis Linux operating system is published on this website. This is a HTML document prepared in single page style. This user manual provides basic information on how to use the Peropesis Linux operating system.

If you have any questions, comments or suggestions regarding the information provided in this user manual, you can write about it in the Peropesis forum or by e-mail info(at)peropesis.org.


Content

1. Introduction
1.1 Typographical markings
2. Booting
2.1 Peropesis live OS booting from USB drive
2.1.1 Saving the Peropesis live ISO image to a USB drive in Linux environment (GUI)
2.1.2 Saving the Peropesis live ISO image to a USB drive in Linux environment (CLI)
2.1.3 Saving the Peropesis live ISO image to a USB drive in Microsoft Windows environment
2.2 Peropesis live booting by using virtual machine, VirtualBox (GUI)
2.3 Peropesis live booting by using virtual machine, VirtualBox (CLI)
3. Login / Logout
3.1 Login
3.2 Logout
3.3 Reboot the system
3.4 Shutting down the system
4. Command-line interface (CLI)
4.1 Shell commands and scripts
4.2 Edit command-line
4.3 Virtual console
4.4 Screen manager - screen
5. Basic programs
5.1 Program pwd
5.2 Program cd
5.3 Program ls
5.4 S-nail email client
6. Help
6.1 Program option --help
6.2 Program man
7. File system
7.1 Layout of the Peropesis file system
7.2 Searching for files
7.3 Mounting the data storage to the file system
7.4 Disk partitioning
7.5 Swap partition
7.6 Partition formatting
7.7 To recover a faulty Linux operating system by using the chroot
8. Network
8.1 Wired (ethernet) connection
8.2 Wireless connection
9. Language, characters, display, keyboard
9.1 locale
9.2 Terminal font
9.3 Keyboard map
10. Software compilation
11. Unsorted documentation
11.1 Peropesis live ISO image
11.2 Loading of required firmware

1. Introduction

1.1 Typographical markings

Below are explanations of the typographical markings used in the user manual.

1. Words in bold font indicate that they are program names.
2. Words in bold font and nearby number indicate that they are program documentation man pages. The number represents the section where the program documentation is placed (/usr/share/man/man1-8).
3. Examples of commands are shown in tables with a blue frame.
4. In the example, a command beginning with # sign means that it requires root privileges to execute.
5. In the example, the command beginning with the $ sign means that a simple user rights is sufficient for its execution.
6. In the example, the text beginning without the # and $ sign represents the result of the executed command.


2. Booting

This chapter is intended to introduce you how to boot Peropesis Linux operating system. The chapter provides two ways to boot Peropesis Linux OS live release to your computer memory. One of them is by using a USB storage device, the other is by using a virtual machine. Below is information on how to do this.


2.1 Peropesis live OS booting from USB drive

Immediately after the computer was turned on, the basic software starts. One of the main functions of this software is to initiate the startup of the operating system. Old type motherboards have the Basic input/output system - BIOS installed. New type motherboards have the Unified Extensible Firmware Interface - UEFI installed. The Peropesis Linux operating system is compatible with both BIOS and UEFI software.

If you want, that not the main operating system which is in hard drive, but the Peropesis operating system from the USB drive would be booted during the start, you must perform two steps: first insert a USB drive (with saved Peropesis OS) into the computer's USB port and second, if necessary, change the default boot options in the opened BIOS/UEFI boot manager/menu or BIOS/UEFI setup utility.

Instructions on how to write the Peropesis ISO image to a USB drive on Windows or Linux operating systems are provided in the sections below. Instruction for making boot changes in the BIOS/UEFI programs are provided futher in this section.

There are two possible ways to tell your computer to boot the Peropesis operating system from a USB device. The first is using the BIOS/UEFI boot manager/menu, the second is using the BIOS/UEFI setup utility. By making changes in the boot manager Peropesis will be booted from the USB drive to the computer's memory only once. By making changes in the setup utility Peropesis will be booted on every computer startup.

Both boot manager and setup utility are opened by pressing the corresponding key immediately after the computer was turned on. Each computer manufacturer has a different opening key for the BIOS/UEFI programs. The most common of these are ESC, Delete or one of the function keys (F1, ... F11, F12 etc.). Find the right key for your PC.

After opening the BIOS/UEFI boot manager, everything what you need to do is to select the USB storage device that contains the Peropesis system. After this step, Peropesis OS will be loaded to the computer memory.

If you want to boot the Peropesis on every boot, boot order changes must be made in the setup utility. In the opened BIOS/UEFI setup utility, we select the Boot category and in the list of devices we find the default USB drive with the Peropesis OS on it. We mark this USB device as the first or only device from which the operating system will be booted. We save this option, turn off the BIOS/UEFI setup utility, and if everything was done correctly, the Peropesis operating system will be booted from the USB drive during the next computer startup.

What to do if the boot manager did not find a USB storage device with the Peropesis operating system written on it among all possible boot devices. In this case, it is likely that your computer's motherboard supports the UEFI interface. In this case, you should open the UEFI setup utility and then disable the Security Boot option in the Security category.

How to login to Peropesis operating system, see chapter 3.

References

1. A group of authors (2024). Booting. Link: https://en.wikipedia.org/wiki/Booting


2.1.1 Saving the Peropesis live ISO image to a USB drive in Linux environment (GUI)

In the Linux environment the Peropesis ISO image can be saved to a USB drive using graphical user interface-accessible (GUI) programs. This section provides instructions on how to write an ISO image using the Startup Disk Creator program available through the graphical environment

Required components

1. Peropesis live ISO image. It can be download from here.
2. 1 GB or higher capacity USB media.
3. The Startup Disk Creator program, which is often found on various Linux desktop environments.

Sequence of actions

1. Insert a USB memory into the computer's USB port.
2. Open program Startup Disk Creator.
3. The program checks your user's Downloads directory at startup and, if it contains an ISO file, selects this file as the default. If you want to select another ISO file instead of the ISO file selected by the program, you can do so using the Other button, which can be found in the program window. The program also checks the USB media connected to the computer during startup and lists them in the Disk to use field. Select the desired USB device..
4. If all program options are right for you, press the Make Startup Disk button. Before starting to copy the ISO file to the USB storage device, the program may provide a warning message about your selected USB storage device so that you have the opportunity to check again whether the selected USB storage device contains any important data that will be destroyed during the burning of the Peropesis ISO file. Check and confirm.

If the above sequence of steps was followed correctly, the Startup Disk Creator should have already started copying the Peropesis ISO file to the default USB drive. The status of the task performing by the program should have changed to Writing disk image…. Because the ISO file of Peropesis live operating system is small, copying process may take up to a minute depending on your computer specifications. The program will alert you with an Installation complete notification when the copying process will be complete. If this message appears, it means that you have created an auto-bootable Peropesis live USB.

How to boot Peropesis live USB to your computer memory, see chapter 2.1.


2.1.2 Saving the Peropesis live ISO image to a USB drive in Linux environment (CLI)

In the Linux environment the Peropesis ISO image can be saved to a USB drive using command-line-based (CLI) programs. This section provides instructions on how to write an ISO image using the dd program accessible through a shell interpreter.

Required components

1. Peropesis live ISO image. It can be download from here.
2. 1 GB or higher capacity USB media.
3. Command-line-based file copying utility dd.

Sequence of actions

1. Connect a USB device to your computer.
2. Open command-line interface. To save a ISO file of Peropesis to a USB drive root authority will be required. Sign as root user. In the directory /dev find which USB device will be used to save the ISO file. USB devices in the /dev category are marked by files sda, sdb, sdc, etc. names Example:

$ ls /dev/sd*

This command lists all hard disks on the computer. The last device in the list is the device that you need. To be sure, by one hundred percent, which device is right for you to write Peropesis ISO image, you can enter the ls command in the terminal once with the media inserted in the USB slot, the next time without the USB media inserted. In each case, the number of devices in the list must be different. If you want there are other ways to find out what devices are currently connected to the computer. You can find it by using the lsblk or blkid programs that are often found in many Linux distributions.
3. To save the Peropesis ISO file to the provided USB drive, enter the following command at the command-line:

# dd if=Peropesis-*-live.iso of=/dev/sd*

Because the ISO file of Peropesis live operating system is small, copying process may take up to a minute (depending on your computer specifications).

How to boot Peropesis live USB to your computer memory, see chapter 2.1.


2.1.3 Saving the Peropesis live ISO image to a USB drive in Microsoft Windows environment

This section provides instructions on how to write the Peropesis ISO image to a USB drive using the Rufus program available through the graphical environment.

Required components

1. Peropesis ISO image. You can download it from here.
2. 1 GB or higher capacity USB media.
3. Application for saving files to USB media, for example, Rufus. If this software is not available on your computer, it should be downloaded and installed.

Sequence of actions

1. Insert the USB storage device into the computer's USB port.
2. Open program Rufus.
3. In the field of Device of the program, select the USB device, to which you want to save the Peropesis ISO image.
4. In the field of Boot selection of the program, let's select FreeDOS (this will create an automatically bootable USB).
5. In program options, Partition scheme and Target system leave default options.
6. Press the SELECT button in the application and then find, select and open Peropesis.iso file in the open files manager. After this step in the field of Volume label the existing information should have been updated to Peropesis.
7. All other options in the program, leave unchanged.
8. To start Peropesis.iso recording to USB key, press START button.
9. After step 8 program Rufus can display several warning notifications, for additional files installing, for ISOHybrid image recording or for destroying the data on your USB drive. If you got this warning notifications, press OK or YES. Before confirming the destruction of data on a USB device, check that there is no data left on the USB drive that is important to you.

If all options have been set correctly, after step 8 or step 9, the program Rufus should have started recording the Peropesis ISO file to the selected USB drive. The status of the task should have changed to Copying ISO files… Because the ISO file of Peropesis live operating system is small, copying process may take up to a minute (depending on your computer specifications). The program will alert you when the copying process is complete - in task status area, note Copying ISO files… will be updated to note Ready. This means that you have created an auto-bootable Peropesis live USB.

How to boot Peropesis live USB to your computer memory, see chapter 2.1.

References

1. Pete Batard (2011-2022). Create bootable USB drives the easy way. Link: https://rufus.ie/en/


2.2 Peropesis live booting by using virtual machine, VirtualBox (GUI)

A virtual machine is a type of program that creates a computer system emulation. Programs of this type extends personal computer functionality, providing it with the architectural features you want, that may be necessary to load the desired software. It is possible to boot the Peropesis operating system on your computer using the virtual machine VirtualBox. This chapter explains how to boot the Peropesis ISO image in a VirtualBox virtual machine using the VirtualBox graphical user interface (GUI).

Required components

1. VirtualBox software. If VirtualBox software is not available on your computer, it can be download and install.
2. Peropesis live ISO image. It can be download from here.

Sequence of actions

1. Open program VirtualBox.
2. Create a virtual machine:
2.1 in the Name and Operating system table, select the name for the virtual machine, specify the working directory, select the type of operating system (Linux, in this case) and select one of the following Linux distributions (in this case, Other Linux (64-bit));
2.2 leave the default options in the Memory size table;
2.3 because we will use VirtualBox to load Peropesis ISO image in RAM, in this step, Hard Disk, to create virtual hard drive is not necessary, so select Do not create a virtual hard disk. The program may inform you of this choice with a warning message. If this happens, confirm that you understand the message and create a virtual machine without the hard disk by clicking the Continue and/or Create button;
2.4 if in the previous steps you did everything well, the program should have already created a virtual machine. In this step, we will specify a specific operating system, that we want to load. Select the Settings category from the top Menu bar. In an open table Options, select the Storage subcategory. In the Storage Devices section, select a device Controller: AHCI (SATA) and add a Peropesis.iso file to it (press the green arrow Adds optical drive, find the Peropesis.iso file in the file manager that appears, select it and confirm it with the OK button);
2.5 now you can try to load the Peropesis.iso file. Press the Start button on the top Menu bar. If in the previous steps everything was done correctly, the loading of the operating system must begin in the newly displayed window.

Wider instructions on how to use the VirtualBox machine, see official VirtualBox User Manual.

How to login to Peropesis operating system, see chapter 3.

Below you can watch video about Peropesis live booting by using virtual machine, VirtualBox.

References

1. Oracle Corporation (2004-2022). Oracle® VM VirtualBox® User Manual. Link: https://www.virtualbox.org/manual/UserManual.html


2.3 Peropesis live booting by using virtual machine, VirtualBox (CLI)

It is possible to boot the Peropesis operating system on your computer using the virtual machine VirtualBox. This chapter explains how to boot the Peropesis ISO image in a VirtualBox virtual machine using the command-line-based VirtualBox interface (CLI) - VBoxManage. VBoxManage is integral part of the Oracle VM VirtualBox software for managing virtual machines using a command line interface. This chapter provides some basic examples of VBoxManage program options and a shell script based on VBoxManage commands. This shell script automatically creates, configures and starts a virtual machine with Peropesis ISO image without any additional effort.

Required components

1. It should be noted that in order to use the VBoxManage tool, it is necessary to have the VirtualBox software installed on your computer. If VirtualBox software is not available on your computer, it should be downloaded and installed.
2. Peropesis live ISO image. It can be download from here.

General VBoxManage commands. These commands are typed at the command prompt on your host computer.

1. Creating a virtual machine.

$ VBoxManage createvm --name SuperMachine --ostype Linux_64 --register

2. Setting a minimum base memory for a newly created virtual machine called "Supermachine".

$ VBoxManage modifyvm SuperMachine --cpus 2 --memory 512 --vram 12

3. Setting a storage device connector standard.

$ VBoxManage storagectl SuperMachine --name SATA --add sata --portcount 2 --bootable on

4. Instructions for the virtual machine to use the Peropesis ISO image. In the command below, instead of the asterisk in the Peropesis-*-live.iso name specify the Peropesis ISO image version number.

$ VBoxManage storageattach SuperMachine --storagectl SATA --port 0 --device 0 --type dvddrive --medium Peropesis-*-live.iso

5. Starting a virtual machine.

$ VBoxManage startvm SuperMachine

6. Stoping a virtual machine.

$ VBoxManage controlvm SuperMachine poweroff

7. Removing a virtual machine.

$ VBoxManage unregistervm SuperMachine --delete

More information about using the VBoxManage tool can be found in the official documentation of the developer of this software here and here.

The above VBoxManage commands can be executed automatically by using a shell script. A pre-written shell script named boot-peropesis.sh can be downloaded from here. Note that this script automatically downloads the latest Peropesis ISO image if you haven't done so before. The script can be initiated by first changing the usage rights of the script file and then typing its name in the command line. Example:

$ chmod +x boot-peropesis.sh
$ ./boot-peropesis.sh

References

1. Yuli Vasiliev (June 2014). Controlling VirtualBox from the Command Line. Link: https://www.oracle.com/technical-resources/articles/it-infrastructure/admin-manage-vbox-cli.html
2. Oracle and/or its affiliates (2004-2022). User Manual, Chapter 8. VBoxManage. Link: https://www.virtualbox.org/manual/ch08.html


3. Login / Logout

Immediately after the Peropesis operating system was loaded, the called login program must be visible on the screen. The login program is used to log in to the system. Logging in to the system means creating a user session. This chapter provides instructions on how to create a new and end an existing user session. This chapter also discusses how to reboot or completely shut down the Peropesis operating system.


3.1 Login

You may login to the Peropesis operating system as root user. There is no password created for this user, so program login will not require password. If you want to create a password for root user, use the program passwd. For example:

# passwd

Learn more about the passwd program and its options on the passwd(1) man pages.


3.2 Logout

If you want to end root or any other user session, use the program logout. For example:

$ logout

If you want again to create new session on behalf of root user, login program will require a password (if you have previously created it for a root user).


3.3 Reboot the system

If you want to restart the Peropesis operating system, you can do so by using the shutdown program in conjunction with the restart option. For example:

# shutdown -r now


3.4 Shutting down the system

If you want to shut down the operating system completely, you must also use the shutdown program by setting it to the halt option. For example:

# shutdown -h now

Learn more about the shutdown program and its options on the shutdown(8) man pages.

Below you can watch video about how to login and logout to Peropesis.


4. Command-line interface (CLI)

At the last stage of the Linux kernel boot, an init program start is initiated. init is the parent of all processes, among all the processes running on the system is marked with PID 1 number. This program initiates the loading/mounting of the file system and controls the management of the system's runlevels by following the instructions described in the /etc/inittab shell script.

Peropesis Linux OS uses the System V style filesystem initialization software. The default runlevel of the Peropesis filesystem is 3. This is a standard multi-user mode without a graphical environment.

After the filesystem is mounted and the system runlevel is set, then init initiates the agetty program startup. agetty opens a tty port, invokes the login program and pushes the system user to sign in / create session.

The program login following the contents of the /etc/passwd file decides with which name and password a new session can be created and predicts what type of shell will be used. This way the shell, command-line interface, finally starts.

The default user interface for the Peropesis Linux operating systems is Bash. Bash is a shell. The shell is both a command-line interpreter and a command programming language. This programming language is designed to manage the system. The command language can be written and executed directly on the command line or the language can be used to create shell scripts that can be executed later. Neither individual commands nor shell scripts need to be compiled before using them. Each time the shell interpreter converts the written commands into machine language and the results of the programs are presented to the system user in a language he understands.

More information about init(8), agetty(8), login(1) and bash(1) programs is available on the man pages of these programs. In the following subsections of this chapter individual examples of working on the command line are touched.

References

1. Linux Foundation (2010). Run Levels. Link: https://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/runlevels.html.
2. Free Software Foundation (September 26, 2022). Bash Reference Manual. Link: https://www.gnu.org/software/bash/manual/html_node/index.html
3. A group of authors. Shell (computing). Link: https://en.wikipedia.org/wiki/Shell_(computing)
4. A group of authors. Interpreter (computing). Link: https://en.wikipedia.org/wiki/Interpreter_(computing)


4.1 Shell commands and scripts

Immediately after the system user session was created, the command line interpreter Bash starts. This program is the default user interface of the Peropesis Linux operating system. With the help of an Bash interpreter, the Peropesis Linux operating system can be managed. The system is managed by executing single commands or scripts written in the command programming language. An example of writing a basic command on the command-line:

$ links peropesis.org

This command opens the peropesis.org website in the links web browser.

An example of creating and executing a simple shell script:

$ cat > mkdir.sh << "eof"
> #!/bin/sh
> DIR="articles"
> if [ ! -e "$DIR" ]; then
> mkdir $DIR
> fi
> eof
$ chmod +x mkdir.sh
$ ./mkdir.sh

This shell script checks for the existence of a directory named "articles", if it does not exist, this directory is created.

References

1. Machtelt Garrels (2008/12/27). Bash Guide for Beginners. Link: https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html


4.2 Edit command-line

The Bash interpreter is provided with Readline library functions that allow users to perform editing tasks at a command-line. Both Emacs and vi content editing modes are available. Emacs editing modes is the default setting and therefore Emacs editor keyboard shortcuts work in the Peropesis command-line interface.

The following are the key combinations for editing (Emacs mode):

Keyboard shortcutsResult
Ctrl+amove the text cursor from the end of a line to the beginning of a line
Ctrl+emove the text cursor from the beginning of a line to the end of a line
Alt+bmove the text cursor back one word
Alt+fmove the text cursor forward one word
Ctrl+wcut one word back
Ctrl+ucut the entire part of the line before the text cursor
Ctrl+kcut the entire part of the line after the text cursor
Ctrl+ypaste the last cut word or part of text
Ctrl+_undo previous actions

Notes:
1. Ctrl means hold down the Ctrl key.
2. Alt means hold down the Alt key.

More information about editing tasks at the command-line can be found in the Bash Reference Manual.

To change the Emacs mode to editor vi mode, the following command must be executed at the command-line:

$ set -o vi

For more information about editor vi shortcuts see this Bash Guide.

The command line supports a list/history of previously entered commands. Command history is stored in the ~/.bash_history file. In the command-line command history can be viewed using the up arrow. The bottom arrow is used to get back to the end of history. Editing tasks can also be performed with commands that have been executed in the past in the command-line.

References

1. 19 September 2022. Readline Interaction. Link: https://www.gnu.org/software/bash/manual/html_node/Readline-Interaction.html
2. Chet Ramey (Sep 26 2022). The GNU Readline Library. Link: https://tiswww.case.edu/php/chet/readline/rltop.html
3. A group of authors (September 04 2018.). Link: http://www.hypexr.org/bash_tutorial.php#emacs


4.3 Virtual console

The management of Peropesis Linux operating system runlevels is controlled by the init program, according to the instructions defined in the /etc/inittab file. The default runlevel of the Peropesis filesystem is 3. This is a standard multi-user mode without a graphical environment. This multi-user system supports six command-line input/output environments, also known as virtual consoles or virtual terminals.

In the system virtual consoles are identified and labeled with the names of the tty1-tty6 devices. These consoles allow users to create six different user sessions on a single system. Different values of environment variables can be defined in each session. Also, in the six different command-line environments can run different programs with different options at the same time.

There is the ability virtual consoles to switch between them. For example, console tty1 can be switched to tty6. ALT+F1-ALT+F6 keyboard key combinations are used to switch virtual consoles. Another way to switch between virtual consoles is to use Alt+Right arrow or Alt+Left arrow keyboard shortcuts.

References

1. A group of authors. Link: https://en.wikipedia.org/wiki/Virtual_console
2. Linux Foundation (2010). Run Levels Link: https://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/runlevels.html


4.4 Screen manager - screen

Screen is a screen manager that allows users to multiply the virtual console screen several times and allows users to copy and paste text between screens. Some basic examples of using the screen command is presented below.

Example of creating a new screen session, named monitor:

$ screen -S monitor

The key combinations Ctrl+a and d are used to detach from the session, named monitor. After these actions, the session runs in the background. Example:

$ Ctrl+a, then d

The -r option is used to connect (attach) to a previously created session, named monitor. Example:

$ screen -r monitor

You can also log in an early session by specifying session number instead of session name. The -ls options are used to find the session number. Examples:

$ screen -ls
311.monitor (Detached)

$ screen -r 311

The exit command is used to end the session. Example:

$ exit

The key combinations Ctrl+a and c are used to create a new shell emulator screen. Example:

$ Ctrl+a, then c

Ctrl+a and 0-9 digit combinations are used to switch between screens. Note that 0 is the first screen screen created. Example:

$ Ctrl+a, then [0-9]

Ctrl+a and Shift+s key combinations are used to display one or more screen screens in a single, horizontally split window. Example:

$ Ctrl+a, then Shift+s

Ctrl+a and | key combinations are used to display one or more screen screens in a single, vertically split window. Example:

$ Ctrl+a, then |

Ctrl+a and Tab key combinations are used to switch between parts of the screen window. Example:

$ Ctrl+a, then Tab

The following are examples of commands for copying and pasting text on the screen.

Ctrl+a and [ keys combinations are used to activate the copy/scroll-back text mode. Example:

$ Ctrl+a, then [

After the copy mode has been activated, “arrows” keys on the keyboard allow you to move around the screen. Move the text cursor to the desired place on the screen.

The space key on the keyboard is used to activate text selection mode. The “arrows” keys are used to select the part of the text that you want to copy. Select desired part of the text.

Use the "space" key on the keyboard to copy the selected text. After pressing space key the selected text is copied and the copy text mode is automatically turned off. The copied text is saved in the buffer.

Ctrl+a and ] keys combinations are used to paste the copied text. Example:

$ Ctrl+a, then ]

Copied text, which is stored in the buffer, can be repeated indefinitely, on different screen screens and in different programs.

Notes:
1. Ctrl means hold down the Ctrl key.
2. Shift means hold down the Shift key.

More information about program screen(1) can be found on screen man pages.

Below you can watch video about how to use emulator screen.

References

1. October 04, 2018. Screen User’s Manual. Nuoroda: https://www.gnu.org/software/screen/manual/screen.html


5. Basic programs

In the Peropesis Linux file system programs are located in /bin, /sbin, /usr/bin and /usr/sbin directories. In order to get to know these programs and then use them, before that, it is necessary to get to know some of the main commands of programs.

Because the Peropesis operating system is minimalist, a command-line-based system, all programs on this system are accessed through a command-line interface. Immediately after the Peropesis OS has been loaded in the computer's RAM and the system has been accessed on behalf of a root user, all programs can be called by specifying their names/commands in the command prompt.


5.1 Program pwd

Program pwd prints working directory or otherwise specifies which system directory you are in as a user.

$ pwd
/root


5.2 Program cd

Program cd changes directory. For example, to access the root directory of a system, you would type the following command at a command prompt:

$ cd /

Conversely, to return to your /root user directory, you must type the following command at the command prompt:

$ cd /root


5.3 Program ls

Program ls (abbreviation for list) lists the files and directories in the specified directory. If you want to know which files or directories exist, for example, in the main system directory, you would type the following command at the command prompt:

$ ls /

By using the ls command, you can find out what sharing programs make up the Peropesis operating system. Examples:

$ ls /bin
$ ls /sbin
$ ls /usr/bin
$ ls /usr/sbin

You can use the Peropesis man pages in order to know exactly, what each programs is for and how to use these programs. For more information about the man program, see the Help chapter below.


5.4 S-nail email client

S-nail is command-line-based email client for both send and receive e-mail. This chapter provides information about how to use this client for receiving and sending e-mail messages by using external SMTP and IMAP (Gmail in this case) servers in the Peropesis Linux OS.

Note. Because the Message transfer agent (MTA) is not installed in the Peropesis distribution, the S-nail email client can only work with external SMTP and IMAP servers.

Gmail secure settings for external e-mail programs

Some free email service providers classify email programs as safe and less safe. The Gmail email service S-nail assigns to less secure and blocks connections to SMTP and IMAP servers by default. In order to be able to connect to these servers with the S-nail program you need to use a 16-digit App password, which can be generated after activating the "2-Step Verification" option in the Gmail security settings. More information about the Gmail SMTP, IMAP, and security options are discussed in sources Check Gmail through other email platforms and Sign in with App Passwords.

Example of ~/.mailrc settings

In the user's home directory in the ~/. mailrc file is defined S-nail program options. This file with some options has already been created in the Peropesis system. Settings can be changed as required. If the system user plans to use the Gmail mail service, need to change the Gmail user login and password in this file. Below are examples of how to do this with the text editor, ed.

To print the contents of a .mailrc file on the screen, type the following command:

$ cat -n .mailrc | more
1 # S-nail setting for Gmail
2 # Before use change "USER" and "PASS" settings for the IMAP and SMTP servers,
3 # also change "set from="Your Name <username@gmail.com>"" setting.
4
5 # v15.0 compatibility mode
6 set v15-compat
7
8 # Essential setting: select allowed character sets
9 set sendcharsets=utf-8,iso-8859-1
10
11 # A very kind option: when replying to a message, first try to
12 # use the same encoding that the original poster used herself!
13 set reply-in-same-charset
14
15 # Due to historical reasons comments and name parts of email addresses are removed by
16 # default when sending mail, replying to or forwarding a message. If this variable is set
17 # such stripping is not performed.
18 set fullnames
19
20 # If set, S-nail asks an interactive user for files to attach at the end of each message;
21 # An empty line finalizes the list.
22 set askattach
23
24 # When a message is replied to and this variable is set, it is marked as having been answered.
25 set markanswered
26
27 # Controls whether a ‘Reply-To:’ header is honoured when replying to a message via reply or Lreply.
28 # This is a quadoption; if set without a value it defaults to ‘‘yes’’.
29 set reply-to-honour=ask-yes
30
31 # If this variable is set then the editor is started automatically
32 # when a message is composed in interactive mode.
33 set editalong
34
35 # Sort mail by date
36 set autosort=date
37
38 # Request strict TLS transport layer security checks
39 set tls-verify=strict
40 set tls-ca-file=/etc/ssl/ca-bundle.crt
41 set tls-ca-no-defaults
42
43 account "personal" {
44
45 localopts yes
46
47 set from="Your Name <username@gmail.com>"
48
49 set record=Sent
50 set inbox=+Inbox
51
52 set folder=imaps://USER:PASS@imap.gmail.com:993
53
54 set mta=smtps://USER:PASS@smtp.gmail.com:465
55
56 }
57
58 # Enable account on startup
59 account personal

The example shows that row 52 of the .mailrc file contains the IMAP server login data and row 54 contains the SMTP server login data. Change this data. In the example, this task is accomplished with a text editor ed:

$ ed .mailrc
1884
54
set mta=smtps://USER:PASS@smtp.gmail.com:465
c
set mta=smtps://new-USER:new-PASS@smtp.gmail.com:465
.
w
1884
q

Explanation of the commands used in the example: command "ed .mailrc" opens a file; command "54" prints the contents of row 54; command "c" means change (change content); entering new content; placing a dot :); enter a command "w" that means write (write content); command "q" means quit. The same steps are performed for row 52.

Learn more about the ed program and its options on the ed(1) man pages. For more information about .mailrc options, see s-nail(1) man pages or the official S-nail website: sdaoden.eu/code-nail.html. A useful example of a. mailrc configuration here.

Note. If another mail service is being used, it is necessary to change the IMAP and SMTP server addresses.

Basic S-nail commands

Send a message at a command prompt:

$ echo "Body of the message" | s-nail -s "Subject" email@address.domain

More about S-nail client command type help. Example:

$ s-nail
?
help
[...]

References

1. A group of authors. (2020/04/26). Mail manual. Link: https://www.sdaoden.eu/code-nail.html
2. Anirudh Oppiliappan. (2020/06/20). The S-nail mail client. Link: https://icyphox.sh/blog/s-nail/


6. Help

The following forms of help are available on the Peropesis Linux operating system.
1. Program option --help.
2. man pages of programs.
For more information about these support forms, see the following chapters.


6.1 Program option --help

The vast majority of compiled and in the Peropesis distribution distributed programs can be executed with the --help option. The program executed with this option prints the instruction manual for the program on the screen. Example:

$ uname --help
Usage: uname [OPTION]...
Print certain system information. With no OPTION, same as -s.

-a, --all print all information, in the following order,
except omit -p and -i if unknown:
-s, --kernel-name print the kernel name
-n, --nodename print the network node hostname
-r, --kernel-release print the kernel release
-v, --kernel-version print the kernel version
-m, --machine print the machine hardware name
-p, --processor print the processor type (non-portable)
-i, --hardware-platform print the hardware platform (non-portable)
-o, --operating-system print the operating system
--help display this help and exit
--version output version information and exit
GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation <https://www.gnu.org/software/coreutils/uname>
or available locally via: info '(coreutils) uname invocation'

The result in the example shows that the uname program can be executed, for example, with the -a option. Example:

$ uname -a
Linux peropesis 6.0.2 #1 SMP PREEMPT_DYNAMIC Thu Oct 20 08:26:47 EEST 2022 x86_64 GNU/Linux


6.2 Program man

The man program is the traditional form of documentation for Unix-like operating systems. The word man is an abbreviation for the english word manual. man pages of programs, which include specially formatted files, are written for the vast majority of programs. Running the command "man program-name" on the command-line displays the man page of the defined program. Example:

$ man pwd

Individual man pages of programs are divided into sections for convenience. In practice, there may be specified a number next to the program name that identifies the man section to which the program is assigned. For example, when reading various educational materials, a link to the bash(1) man page can be seen. This mark indicates that the man page of bash program is assigned to chapter 1, common programs. If necessary, you can specify the type of documentation you need for the man program. For example, if you need the ncurses man page for Chapter 3 (theme: libraries), you would enter the following query on the command line:

$ man 3 ncurses

The section numbers of the manual:

SectionType of documentation
1Executable programs or shell commands
2System calls (functions provided by the kernel)
3Library calls (functions within program libraries)
4Special files (usually found in /dev)
5File formats and conventions, e.g. /etc/passwd
6Games
7Miscellaneous (including macro packages and conventions)
8System administration commands (usually only for root)
9Kernel routines

In the Peropesis operating system, programs such as whatis and apropos are available in addition to man program. These programs are an integral part of the man software package and these programs are designed to make searching in the man database easier.

The whatis program provides a very brief description of the programs available on the system. Example:

$ whatis bash
bash (1) - GNU Bourne-Again SHell

The apropos program is used when you want to find man pages that mention your given keyword. This is especially useful when searching for programs when the exact name of the program is unknown. For example:

$ apropos bash
bash (1) - GNU Bourne-Again SHell
builtins (1) - bash built-in commands, see bash(1)
rbash (1) - restricted bash, see bash(1)WaveLAN/IEEE 802.11 device driver

Note. If you want to use the whatis and apropos programs in the Peropesis system, it is first of all necessary to create or update the man database. This can be done by typing the following command at the command line:

$ mandb

More information about man(1), whatis(1) and apropos(1) programs can be found on the man pages of these programs.

References

1. A group of authors. man page. Link: https://en.wikipedia.org/wiki/Man_page
2. Machtelt Garrels. (2003). Getting help. Link: https://tldp.org/LDP/intro-linux/html/sect_02_03.html


7. File system

The Linux file system contains a single main directory. This main directory is called root directory. root directory in the system is represented by a slash (/). Each directory in the root directory is called a subdirectory. Linux file system can be imagined as a file directive tree - root directory with several subdirectories branching from it and also hundreds if not thousands other other directories and files branching from these subdirectories. The development of the Linux file system is based on general filesystem hierarchy standards.


7.1 Layout of the Peropesis file system

The development of the Peropesis Linux file system is based on general filesystem hierarchy standard. The main root directory (/) contains the following directories:

DirectoryPurpose
/binDirectory for storing core programs.
/bootDirectory for storing required files on Linux boot, including Linux core image and initrd file system image.
/devDirectory for storage of device nodes / files.
/etcDirectory for storing configuration files.
/homeDirectory for storing for system users' home directories.
/libDirectory for storing programs libraries.
/lib64Directory for storing programs libraries, that support 64-bit software.
/mediaDirectory for storage of mounted media (floppy, cdrom, etc.).
/mntDirectory for storing temporarily installed devices (e.g. USB).
/optDirectory for storing second-tier software packages installed by system users.
/procA virtual file system stores information about kernel-controlled processes.
/rootHome directory for user root
/runThis directory stores information about users, that are currently logged on and running daemons.
/sbinDirectory for storing core programs.
/sysThis directory stores data about devices and some of the functions performed by the kernel.
/tmpDirectory for storing temporary files.
/usrSecond basic part of file system.
/varThe storage directory for files that contain variable content (for example, system logs).

References

1. A group of authors. Filesystem Hierarchy Standard. Link: https://refspecs.linuxfoundation.org/fhs.shtml


7.2 Searching for files

Different programs can be used to search for files in the Peropesis root file system. Program whereis is used when searching for binary files (programs) or these programs man pages in a file system: Example:

$ whereis bash
bash: /bin/bash /usr/share/man/man1/bash1

Program find can be used to search for files and directories or is used to further interact with the files or directories you have found. With find program options files and directories can be searched using the following criteria: by file name, creation date, expected location on file system, file owner, etc. Below is an example of searching for hostname on the entire root file system:

$ find / -name hostname
/etc/hostname
/etc/init.d/hostname
/proc/sys/kernel/hostname
/bin/hostname

Other Linux commands can also be executed in parallel with the find command. Below is an example of finding and deleting the file named core:

$ find /tmp -name core -type f -print | xargs /bin/rm -f

Another search program, locate, is used to find files by name. This program runs faster than find, because it looks for files in a pre-built database instead of the entire file system. The latest Peropesis release does not have a pre-installed file database, so it must be created before using program locate. Example of creating a file database:

$ updatedb

Example of the file whereis search:

$ locate whereis
/usr/bin/whereis
/usr/share/man/man1/whereis.1

For more information about whereis (1), find (1), updatedb (8) and locate (1) programs, see the man pages of these programs.


7.3 Mounting the data storage to the file system

Data storage devices can be mounted to the Peropesis file system to perform information transportation tasks or to create additional data storage to compensate for the lack of available computer memory.

The following storage types can be used: solid-state drive (SSD), hard disk drive (HDD), USB flash drive or micro SD (Secure Digital) card. It is recommended to use storage and computer connections with a higher data transfer speed.

Peropesis operating system comes with eudev software. When a storage device is plugged into the computer socket, a node of this device is created with the help of eudev in the /dev directory. In the system, a node is expressed as a file name. USB devices connected to the computer are marked with sdx file names and micro SD cards - with mmcblkx file names. The symbol x is a variable. The first connected device is labeled as sda or mmcblk1, the second as sdb or mmcblk2, and so on.

Below are an examples of how to mount and umount a 32GB micro SDHC card with a maximum data transfer rate of 50MB/s for storage.

Sequence of actions:

1. The media is inserted into the computer port.
2. Using the lsblk program, the media connected to the computer is found. Example:

$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:16 1 14.4G 0 disk
mmcblk1 179:768 0 29.8G 0 disk

The example shows a list of devices. In this case, the required device is indicated by the file name mmcblk1.

3. In order for us to be able to read from and write information to this device, this device must be mounted into the Peropesis file system. The /mnt directory is intended for installing devices into the system. The mount program is used to install the device. Example:

# mount /dev/mmcblk1 /mnt

4. We can use the ls command to scan information from the device mmcblk1, that is currently mounted into the /mnt directory. Example:

$ ls /mnt
file1 file2 directory1/ directory2/

The example shows that there are two files (file1 and file2) and two directories (directory1/ and directory2/) on the device. With the help of other programs, additional files can be created on the micro SD device, also existing files on the micro SD device can be saved to other folders of the Peropesis file system, and vice versa - files from the Peropesis file system can be copied to the micro SD device.

5. The umount program is used for unmounting a device from the Peropesis file system. Example:

# umount /dev/mmcblk1

References

1. A group of authors (2024). SD card. Link: https://en.wikipedia.org/wiki/SD_card#SDHC


7.4 Disk partitioning

The data storage have the ability to be devided into multiple sub-storage areas/regions so that each of these regions can be managed independently. The devided areas are called partitions. This method makes it possible to organize work with data storages in a more practical way. For example, one storage partition can be used to store important information and to perform large-scale compilation tasks, the other partition can be used for swap space.

In the Peropesis Linux distribution, the fdisk program is used to partition data storages. Further in this section, an example of splitting a 128 GB solid state drive (SSD) into two partitions is given. The first partition is an expected 2 GB swap partition, which can later be used to expand the random-access memory - RAM. The second partition is an expected 126GB Linux type partition which can later be used to store information.

1. Using the lsblk program, we find the solid state drive connected to the computer. Example:

$ lsblk -d
mmcblk1 179:768 0 128G 0 disk

2. We open the fdisk program and specify to use the /dev/mmcblk1 device. Example:

# fdisk /dev/mmcblk1
Welcome to fdisk (util-linux 2.39.3).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

3. Using option o we delete existing partitions. Example:

Command (m for help): o

Created a new DOS disklabel with disk identifier 0xbe7ddf7b.

4. Using option n (new), we create a new swap partition. Example:

Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p):

5. We mark the partition as primary and give a number 1 for partition. Example:

Using default response p.
Partition number (1-4, default 1): 1
First sector (2048-134217728, default 2048):

6. Press enter to create the first sector and set the partition size to 2 GB. The size of the swap partition depends on the amount of RAM you have on your computer. In most cases, it is recommended to create a swap partition twice as large as the amount of RAM on the computer. Example:

Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-134217728, default 134217728): +2G

Created a new partition 1 of type 'Linux' and of size 2 GiB.

7. Using option t (type), we change a type of the created partition to 82 (Linux swap). Example:

Command (m for help): t
Selected partition 1
Hex code or alias (type L to list all): 82
Changed type of partition 'Linux' to 'Linux swap'.

8. Using option n, we create a second - Linux partition, which will later be used as storage. Example:

Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p):

9. We mark the partition as primary and give the number 2 for the partition. Example:

Using default response p.
Partition number (2-4, default 2): 2
First sector (4196352-134217728, default 616448):

10. We press enter to create the first sector and select the partition size to 126 GB, by pressing enter again. Example:

Last sector, +/-sectors or +/-size{K,M,G,T,P} (4196352-134217728, default 134217728):
Created a new partition 2 of type 'Linux' and of size 126 GiB.

11. Using option p (print), we print a scheme of the created partitions. Example:

Command (m for help): p
Disk /dev/mmcblk1: 128 GiB, 137438953472 bytes, 30277632 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xef3be860

Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 2048 4196351 4194304 2G 82 Linux swap
/dev/mmcblk1p2 4196352 134217728 26081280 126G 83 Linux

12. Using option w (write), we write the partitions to solid state drive. Example:

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

More information about program fdisk and its options can be found on the fdisk(8) man page.

References

1. A group of authors (2024). Disk partitioning. Link: https://en.wikipedia.org/wiki/Disk_partitioning
2. Anthony Lissot (2000 birželio 12 d.). Partitioning with fdisk. Link: https://tldp.org/HOWTO/Partition/fdisk_partitioning.html


7.5 Swap partition

Virtual memory can be used to expand the main, random-access memory - RAM. In the Linux operating systems, virtual memory is created by using part of the disk space, creating an independent partition or file on this disk. This created file or partition is called swap partition.

An example of creating a swap partition is given in the previous chapter Disk partitioning. In order for the Linux kernel to be able to use the additional memory, the created swap partition must be specified in the /etc/fstab table and activated. Example:

# echo "/dev/mmcblk1p1 swap swap defaults 0 0" >> /etc/fstab
# swapon -a

The -a (all) option of the swapon command means that all devices marked as swap in the fstab table will be accessible.

More information about program swapon and its options can be found on the swapon(8) man page.

References

1. A group of authors (2024). Memory paging. Link: https://en.wikipedia.org/wiki/Memory_paging#Unix_and_Unix-like_systems
2. Anthony Lissot (2005 gruodžio 26 d.). Setting Up Swap Space. Link: https://tldp.org/HOWTO/Partition/setting_up_swap.html


7.6 Partition formatting

An example of creating a Linux partition is given in the previous chapter Disk partitioning. A Linux type partition stores Linux file systems. The default Linux file system is ext4. In the Peropesis operating system the main tool for formatting an ext4 system is the mke2fs program. An example of partition formatting provided later in this section.

In the newly created disk partition, which is expressed as a file name, we tell the mke2fs program to create an ext4 format file system. Example:

# mke2fs -t ext4 -c /dev/mmcblk1p2

The option -t (type) specifies the future file system type. Option -c (check) checks whether there are no bad blocks in the device.

More information about program mke2fs and its options can be found on the mke2fs(8) man page.

In order to be able to write information to the newly created and formatted partition, it is necessary to mount this partition to the Peropesis file system. The /mnt directory is intended for mounting partitions in the file system. The mount program is used to mount the partition. Example:

# mount /dev/mmcblk1p2 /mnt

See chapter Mounting the data storage to the file system for more information on how to mount and umount devices and partitions.

Šaltiniai

1. A group of authors (2024). Ext4. Link: https://en.wikipedia.org/wiki/Ext4
2. Anthony Lissot (2005 gruodžio 26 d.). Formating Partitions. Link: https://tldp.org/HOWTO/Partition/formatting.html


7.7 To recover a faulty Linux operating system by using the chroot

Live edition of the Peropesis operating system can be used for recovering working option of other, faulty operating system - by loading Peropesis system in the computer's memory, by mounting the current faulty system which is on the hard drive to Peropesis and by using the chroot Program for restoring corrupted libraries or other essential files.

Chroot program executes commands in a directory to which root authority is assigned. On many systems, only the super-user can do this. When, for some reason, such as, incorrect libraries are installed, normally the operating system stops booting, by mounting this corrupted system into another file system and by using the chroot program, then come up an possibility to modify information on a corrupted file system, in directories such as /lib64 or /sbin, this allows you to restore what has been damaged.

The following is a 4-step action plan, how to connect to a damaged file system by using the chroot program.

1. In the first step live edition of the Peropesis OS need to write to USB storage. Instructions on how to do this are provided in this chapter.
2. In the second step the Peropesis live OS, which is written to media need to load to computer, that has a damaged operating system, memory. Instructions on how to do this are provided in this chapter.
3. In the third step a faulty file system need to mount into the Peropesis file system. Usually, the Linux operating system, that is installed on your computer's disk has at least two partitions - swap and Linux. In the system, these partitions can be represented by sda1 and sda2 file names (file names also can be sdb, sdc, etc.). Only one of the following partitions should be installed in the Peropesis system, i.e. a partition containing Linux (not swap) file system. Partition type can be obtained from lsblk program. Example:

$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 500G 0 disk
├─sda1 8:1 0 498.5G 0 part /
└─sda2 8:2 0 1.5G 0 part [SWAP]

# mount /dev/sda2 /mnt

4. After the faulty file system has been mounted to the Peropesis file system /mnt directory, the chroot command can be executed. Example:

# chroot /mnt /bin/bash

After this command, the chroot program changes the main file system root directory into a new root directory and from then on, in subdirectories is opportunity to perform the desired actions. More information about chroot program options can be found on the chroot (1) man page.

exit command used to exit from chroot environment after actions is finished. Finally, the file system is unmounted from the /mnt subdirectory of the Peropesis file system. Example:

# exit

# umount /mnt

References

1. A group of authors. Run a command with a different root directory. Link: https://www.gnu.org/software/coreutils/manual/html_node/chroot-invocation.html#chroot-invocation
2. A group of authors. Chroot. Link: https://en.wikipedia.org/wiki/Chroot


8. Network

Peropesis supports two types of network connectivity, wired and wireless. This chapter describes how by using the Peropesis operating system to connect to a network in both of the following ways.


8.1 Wired (ethernet) connection

Program dhcpcd is installed in the Peropesis operating system. dhcpcd is a DHCP protocol client. DHCP - dynamic host configuration protocol, is a way to assign an IP address to a computer at startup. Client dhcpcd take an information (IP address, routes, and so on) from server dhcpd and automatically configures the network interface on the computer where it is installed and running. The program dhcpcd is initiated during the Peropesis system boot. The initialization script is described in the /etc/init.d/network file. This script contains two functions for creating and deleting loopback and ethernet interfaces. This script also includes "case" control construct of these functions. To sum up, when you type a commands: /etc/init.d/network start | stop | restart at a command line, then loopback and network (ethernet) interfaces are run, stoped or rebooted. For example:

If you want to create loopback and ethernet interfaces, you must type the following command at the command prompt:

# /etc/init.d/network start

If you want to stop loopback and ethernet interfaces, you must type the following command at the command prompt:

# /etc/init.d/network stop

If you want to stop and then immediately to re-create loopback and ethernet interfaces, you must type the following command at the command prompt:

# /etc/init.d/network restart

For more information about the dhcpcd (8) program, see on this program's man page.

In the system is installed ifconfig and route network configuration and control programs. Program ifconfig shows network interfaces in the system and it is designed to configure these interfaces. Program route show / manipulates the kernel's IP routing tables. For example:

If you want to get information about the network interfaces that are available on your system, you must type the following command at the command prompt:

# ifconfig -a

If you want to get information about existing routes in the system, you must type the following command at the command prompt:

# route

For more information about ifconfig (8) and route (8) programs, see on these program's man pages.

References

1. Roy Marples. dhcpcd. Link: https://roy.marples.name/projects/dhcpcd
2. A group of authors. Interface Configuration for IP. Link: http://www.faqs.org/docs/linux_network/x-087-2-iface.interface.html


8.2 Wireless connection

This section describes how to connect to wireless network access point.

1. The first step involves checking if a wireless network interface has been established in the loaded Peropesis system. This can be done by writing the following command on the command line:

# ifconfig -a

2. A list of available wireless access point can be found by using this command:

# iw dev interface scan | grep SSID

3. The following command is used to check interface status:

# iw dev interface link

4. If your device is not connected to an access point and, if wireless network access point is not password protected, the command below is used to connect to it:

# iw interface connect SSID

5. If wireless network access point is password protected (WPA or WPA2), wpa_supplicant and wpa_passphrase programs are used to control the wireless network auto authentication process. Example:

# wpa_supplicant -B -i interface -c <(wpa_passphrase MYSSID PASS)

Or other way:

# wpa_passphrase MYSSID PASS | cat > /etc/wpa_supplicant.conf
# wpa_supplicant -B -i interface -c /etc/wpa_supplicant.conf

6. dhcpcd program will configure wireless network interface data automatically.

7. To connect to hidden wireless network access point, you need to create a configuration file /etc/wpa_supplicant.conf with the content in the example:

# cat > /etc/wpa_supplicant.conf << "EOF"
network={
ssid="SSID_name"
scan_ssid=1
psk="Password"
}
EOF

The wpa_supplicant program is used to start the auto identification process. The wpa_supplicant program must be instructed to retrieve login data from a previously created file. Example:

# wpa_supplicant -B -i interface -c /etc/wpa_supplicant.conf

For more information about iw (8), wpa_supplicant (8) and wpa_passphrase (8) programs, see on these program's man pages.

References

1. Paul Michel (2019/06/18). About iw. Link: https://wireless.wiki.kernel.org/en/users/Documentation/iw
2. Johannes Berg (2019/05/28). About nl80211. Link: https://wireless.wiki.kernel.org/en/developers/documentation/nl80211


9. Language, characters, display, keyboard

9.1 locale

The software distributed in the Peropesis Linux operating system has the ability to be customized for the system user living in a specific region, defining the system language, region, currency, time and other special settings that the system user wants to see in his interface. The system responsible for managing the language options and regional features of the software in the Peropesis distribution is called a locale.

By default, the United States locale is selected in the Peropesis system. In the system, this locale is defined in en_US.UTF-8 format, where 'en' represents language, 'US' represents territory, and 'UTF-8' represents text encoding standard. If you want to check which locale is set in the system during the current session, you need to execute the command locale. Program locale is part of the GNU C Library software. Example:

$ locale
LANG="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

The values of the variables in the result are defined by the /etc/profile file. These variable values can be changed at your own discretion. Before changing these values, you must first check which locale frameworks are installed in the filesystem. You can do this by running the locale command with the '--all-locales' option. Example:

$ locale -a
C
C.utf8
en_US.utf8
POSIX

All locales installed in the Peropesis system are stored in a filesystem /usr/lib/locale directory archive called locale-archive. The result in the example shows that only a few locale choices are installed in the Peropesis filesystem. If you need to set a locale in the system that is not in the list, for example France, this locale can be compiled. Another GNU C Library tool, localedef, is used to install a new locale. Example:

$ localedef -i fr_FR -f UTF-8 fr_FR.UTF-8

To verify that the installation of France locale succeeded, the locale command must be executed again. Example:

$ locale -a
C
C.utf8
en_US.utf8
fr_FR.utf8
POSIX

The result in the example shows that an additional fr_FR.UTF-8 locale appeared in the list. It is now possible to change the system locale values to new values. If you want to change the values of all locale variables at once, you only need to define the value of one variable 'LC_ALL'. Example:

Note. Before changing the locale values to the values of the newly installed locale, it is necessary to reboot the user session (logout/login). Only this way the newly installed values of the environment variable locale can be loaded.

$ LC_ALL=fr_FR.UTF-8
$ export LC_ALL

If there is a need to set the global system language, for example french, the value of the 'LANG' variable needs to be additionally defined. Example:

$ export LANG=fr_FR.UTF-8

We're checking for new locale values. Example:

$ locale
LANG="fr_FR.UTF-8"
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"

After definition of these new variable values, the default location and language for all applications in the system will be french. As a result, if you query 'bash --version' on the command line, bash will display french messages to the system user. Program messages written in various languages (between them and french) are stored in the /usr/share/locale directory of the file system. Example:

$ bash --version
GNU bash, version 5.2.0(1)-release (x86_64-peropesis-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
Licence GPLv3+ : GNU GPL version 3 ou ultérieure <http://gnu.org/licenses/gpl.html>

Ceci est un logiciel libre ; vous être libre de le modifier et de le redistribuer.
AUCUNE GARANTIE n'est fournie, dans les limites permises par la loi.

Note. After defining new locale values, diacritics displayed on the terminal screen may not be displayed correctly. If you want the additional diacritics used in french - à / è / ì / ò / ù to be correctly visible in the displayed text, additionally, you need to set the system font with a suitable character set. How to do this is discussed in the chapter - terminal font.

Additional information about localization options in various terminal-based programs can be found at this source.

References

1. Niels Kristian Bech Jensen (March 2000). Locale support in libc 5.4.x and higher. Link: https://tldp.org/HOWTO/Danish-HOWTO-5.html
2. A group of authors (2003-2022). Locale (computer software). Link: https://en.wikipedia.org/wiki/Locale_(computer_software)
3. A group of authors (2008-2022). Internationalization and localization. Link: https://en.wikipedia.org/wiki/Internationalization_and_localization


9.2 Terminal font

In the Peropesis Linux OS, program setfont is used to control screen fonts. Setfont is part of the KBD (Linux keyboard tools) software package. All available KBD fonts in the Peropesis file system are stored in the /usr/share/consolefonts directory. By default LatArCyrHeb-14 -m 8859-1 font is set in the Peropesis system. If you want to set a different font, you must run the setfont command at the command prompt. Example:

$ setfont LatGrkCyr-8x16 -m 8859-1

After executing this command, the text font displayed on the screen will be LatGrkCyr, font size - 8x16, local character set - ISO 8859-1. For more information about which character set (8859-1, 8859-2, 8859-3, etc.) should be selected, see article ISO/IEC 8859.

If there is a need to return to the default system font, the setfont command must be executed again in the terminal without any additional options. Example:

$ setfont

More information about setfont(8) can be found on the man page of this program.

References

1. Andries Brouwer (2002-10-12). Console generalities. Link: http://kbd-project.org/docs/howto-linux-keyboard-and-console/kbd-3.html
2. A group of authors (2001-2022). ISO/IEC 8859. Link: https://en.wikipedia.org/wiki/ISO/IEC_8859


9.3 Keyboard map

In the Peropesis Linux OS, the loadkeys program is used to manage the keyboard maps. Loadkeys is part of the KBD (Linux keyboard tools) software package. All available KBD keyboard maps in the Peropesis file system are stored in the /usr/share/keymaps directory. If necessary, loadkeys program is used to load the desired keyboard map. Example:

$ loadkeys de-mobii

After executing this command, a map of the de-mobii keyboard is being loaded. This map enables you to enter diacritics such as ä / ß / ö / ü into the system using the keyboard. To switch the keyboard map back to the default kernel keymap on the terminal, the loadkeys command must be reexecuted with the -d option. Example:

$ loadkeys -d

More information about loadkeys(1) can be found on the man page of this program.

References

1. Andries Brouwer (2002-10-12). Keyboard generalities. Link: http://kbd-project.org/docs/howto-linux-keyboard-and-console/kbd-2.html
2. Andries Brouwer (2002-10-12). Resetting your terminal. Link: http://kbd-project.org/docs/howto-linux-keyboard-and-console/kbd-4.html


10. Software compilation

This chapter provides instructions for compiling software from source code. These instructions can be used to compile all software that accords GNU Build System standards. Software compiled by these standards can be used on most Unix-like systems, including the Peropesis file system.

Basic instruction. You need:
1. To download software that is prepared in source code format.
2. To extract downloaded archive using archiver tar and compressors xz, gzip, bzip2, lzip or zstd.
3. To enter to the directory, which contains the extracted software source code.
4. To call the shell script named ./configure. The script will perform the tasks of making the compiled software compatible with your system.
5. To compile the software using make, a program that manages the automatic compilation process.
6. To install the compiled software to the desired directory or to the Peropesis file system using the make install command.

Basic instruction in brief:

$ wget https://.../software.tar.gz
$ tar -xvf software.tar.gz
$ cd software
$ ./configure
$ make
# make install

The following is a basic example of installing the curl software. Program curl is used in command lines or scripts to transfer data.

You need to download curl. The latest release of curl can be checked here. You can use the wget program to download the package. Example (you must type the latest version number of the curl instead of the asterisk):

$ wget https://curl.se/download/curl-*.tar.gz

Once downloaded, archived, and compressed, the software package must be extracted. Example:

$ tar -xvf curl-*.tar.gz

In the next step, you need to enter to the extracted curl directory. Example:

$ cd curl-*

In the curl software documentation provided whith source code, the docs/install.md file contains instruction for installing the curl. The first step in the instruction indicates the excuting of the ./configure script. Example:

$ ./configure --prefix=/usr --libdir=/usr/lib64 --with-openssl

Note. In the example, the ./configure script is run with options. Option --prefix=/usr represents a future software location in the Peropesis file system, --libdir=/usr/lib64 represents a future libraries location in the file system, --with-openssl specifies to use OpenSSL.

The make program is called to start the compilation process. Example:

$ make

The make install command is used to copy/install compiled software to the desired directory or to Peropesis file system. Example:

$ make install DESTDIR=/path
or
# make install

After the last step, the curl software should be installed in the desired directory or in the Peropesis file system. Let's call the program curl. Example:

$ curl --version

More information about make and its options can be found on the make(1) man page.

Below you can watch video about how to install bc software from source code. More information about bc can be found at https://git.gavinhoward.com/gavin/bc/.


11. Unsorted documentation

This chapter publishes the documentation that was not thematically close to the topic of any other chapter.


11.1 Peropesis live ISO image

This chapter contains a file system (iso9660) plan of Peropesis optical disk image (ISO). Also this chapter provides an example of extracting an ISO image. One possible way to extract an ISO image is to mount the image into a file system. Tools such as mount and loop are used for image mounting. These tools are distributed in most Linux distributions between them and in the Peropesis Linux distribution. Example of Peropesis ISO image mounting:

# modprobe loop
# mount -t iso9660 -o loop Peropesis-*-live.iso /mnt
mount: /mnt: WARNING: device write-protected, mounted read-only.
# find /mnt | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|____mnt
| |____changelog.txt
| |____EFI
| | |____BOOT
| | | |____grub.cfg
| |____images
| | |____efiboot.img
| | |____rootfs.xz
| | |____usr.sqsh
| |____isolinux
| | |____boot.cat
| | |____boot.txt
| | |____isolinux.bin
| | |____isolinux.cfg
| | |____ldlinux.c32
| |____kernel
| | |____config
| | |____vmlinuz
| |____readme
| |____readme2
# ummount /mnt

A discussion of the elements contained in the ISO image:

1. changelog.txt - Peropesis distribucion change history.
2. EFI/BOOT/grub.cfg - configuration file for GNU GRUB bootloader.
3. images - the directory where the root filesystems is placed.
4. efiboot.img - FAT type file system image, which is intended to work with motherboards with UEFI firmware.
5. rootfs.xz - Peropesis root filesystem.
6. usr.sqsh - squashed file system.
7. isolinux - Isolinux bootloader directory.
8. boot.txt - bootloader information message.
9. isolinux.bin - Isolinux bootloader.
10. isolinux.cfg - Isolinux bootloader configuration settings.
11. ldlinux.c32 - module.
12. kernel - Linux kernel directory.
13. config - Linux kernel configuration file.
14. vmlinuz - Linux kernel.
15. readme - Peropesis distribution license.
16. readme2 - List of software used in Peropesis Linux distribution.

References

1. jlliagre (04-20-2008). What command can display files in a tree? Link: https://www.unix.com/302187300-post17.html


11.2 Loading of required firmware

Some hardware in Linux operating systems only works with certain types of commercial software, that does not have open source access and is therefore not included in the Linux kernel software package. This type of commercial software is called firmware and is distributed separately from the Linux kernel.

During Linux kernel boot, the kernel identifies hardware detected in the environment and enables it to run on the system. However, the hardware that requires additional commercial software (firmware) for its operation - and that firmware is not installed in the system - does not work.

Only a small number of firmware images are included in the Peropesis Linux distribution. If the Linux kernel identifies hardware, but does not find a firmware image in the Peropesis filesystem to communicate with that hardware, there is a real risk that the identified hardware will not work on the Peropesis system. When such a situation occurs, the system user is informed about it by an information message, the content of which looks something like this: "Direct firmware load for [...] failed with error -2".

If the system user received a message with such content from the kernel and after checking, the detected hardware is not working, but the user still wants to use the hardware, the following steps are required: a) to identify the firmware image name, b) to find the required image and/or download the image from the internet, c) to copy this image to the Peropesis filesystem, d) to reload the Linux kernel module that is responsible for communicating with this image. Further is explained how to do this.

1. Determining the exact image name of firmware not included in the Peropesis system but required for hardware operation. Example:

$ dmesg | grep firmware
[ 11.489116] rtl18723be 0000:02:00.0: Using firmware rtlwifi/rtl18723befw_36.bin
[ 11.489209] rtl18723be 0000:02:00.0: Direct firmware load for rtlwifi/rtl18723be_36.bin failed with error -2

Another way to find missing firmware could be to read the messages in the system or kernel logs. These logs are stored in the /var/log directory in the Peropesis system. Example:

$ cat /var/log/sys.log | less

The example shows that the kernel failed to load a firmware image named rtl18723befw_36.bin. At each boot, the Linux kernel looks for firmware images in the /lib/firmware file system directory. The example shows that the kernel looked for this image in the rtlwifi/ directory. The full search path - /lib/firmware/rtlwifi/rtl18723befw_36.bin.

2. Finding and downloading a firmware image (in this case rtl18723befw_36.bin) on the internet. Most firmware images can be found in the Linux firmware git repository: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ The image we need in this repository is placed in the rtlwifi/rtl8723befw_36.bin directory. This image can be downloaded to the Peropesis system using tool wget or browser links. Example:

$ wget https://git.kernel.org/pub/scm/linux/kernel/ git/firmware/linux-firmware.git/plain/rtlwifi/rtl8723befw_36.bin

If you do not have access to the Internet, you can use a USB device to upload the image to the Peropesis system (see chapter Installing temporary devices in the /mnt directory).

3. Copying the image to a dedicated directory. As mentioned above, the Linux kernel looks for firmware images in the /lib/firmware directory. The message sent from the kernel shows that it expected to find the rtl18723befw_36.bin image in the rtlwifi/ directory. The next step should create this directory and move the required image into it. Example:

# mkdir /lib/firmware/rtlwifi
# mv rtl8723befw_36.bin /lib/firmware/rtlwifi

4. The last step is to reboot the Linux module. In our case, the rtl18723be module is responsible for communicating with this firmware image. The list of all loaded modules in the system can be viewed using the lsmod program. This module needs to be deleted and added again for the hardware to work. This can be done using the modprobe program. Example:

# modprobe -r rtl18723be
# modprobe rtl18723be

The end, now you can check to see if your hardware interface is working.

References

1. A group of authors. Binary blob. Link: https://en.wikipedia.org/wiki/Binary_blob
2. The kernel development community. Linux Firmware API. Link: https://www.kernel.org/doc/html/latest/driver-api/firmware/index.html
3. Bruce Dubbs (2018-09-23). About Firmware Link: https://www.linuxfromscratch.org/blfs/view/basic/firmware.html
4. A group of authors (Aug 4, 2015). Load unmodified firmware without rebooting. Link: https://github.com/dhalperi/linux-80211n-csitool-supplementary/issues/91


Copyright © 2021-2024 Peropesis. See license terms.
E-mail: info(at)peropesis.org