Linux basics Flashcards
Czym jest linux?
Linux jest systemem operacyjnym podobnym do systemów z rodziny UNIX. Składa się z kilku elementów, które są niezbędne do jego funkcjonowania.
Linux jest otwartym systemem operacyjnym na komputery osobiste. Został wydany po raz pierwszy we wrześniu 1991 roku.
Po prawie 30 latach od zaprezentowania Linux jest szeroko wykorzystywany w motoryzacji, sprzęcie sieciowym oraz telefonach komórkowych. Od kwietnia 2017 roku Android (oparty na systemie Linux) jest najpopularniejszym systemem operacyjnym na świecie. System operacyjny Linux rozwijany jest przez społeczność. Znany jest z trwałości i bezpieczeństwa, jaki jest w stanie zaoferować, dzięki czemu używany jest w komercyjnych urządzeniach sieciowych i centrach danych. Klienci indywidualnie doceniają dużą możliwość personalizacji systemu do własnych potrzeb.
Linux was inspired by MINIX, which in turn was inspired by Unix.
Linux is based on a philosophy that software and operating systems should be free. Both free of cost and freely changeable.
Czym jest jądro systemu?
Jądro (ang. kernel) to rdzeń całego systemu operacyjnego. Wysyła instrukcje bezpośrednio do procesora, pamięci RAM oraz urządzeń peryferyjnych.
Co to znaczy, że system jest unixowy /juniksowy/ ?
UNIX to system operacyjny, który jjest systemem wielozadaniowym – to znaczy, że w tym samym czasie może być wykonywane więcej niż jedno zadanie. Jest też wielodostępy – jednocześnie może być zalogowanych wielu użytkowników.
System UNIX jest systemem przystosowanym do pracy w sieci – pozwala na zdalne
wykonywanie poleceń. Ma strukturę hierarchiczną – jest zbudowany z katalogów o strukturze drzewiastej.
U podstaw systemu znajduje się katalog główny (ang. root) oznaczony przez /.
Ze względu na bezpieczeństwo w systemie mogą pracować tylko zarejestrowani użytkownicy.
Każdy użytkownik posiada swoje konto – obszar, w którym zgromadzane są dane
pojedynczego użytkownika – do którego dostęp chroniony jest hasłem.
1.Hierarchiczny system plików – wszystko jest plikiem.
2. Wielozadaniowość – możliwość uruchamiania wielu procesów jednocześnie.
3. Wielodostępowość – obsługa wielu użytkowników.
4. Interfejs wiersza poleceń (shell) – umożliwia interakcję z systemem poprzez tekstowe polecenia
5. Modułowa budowa – system składa się z wielu małych narzędzi, które można łączyć w potoki (ang. pipelines)
6. Obsługa uprawnień i użytkowników – każdy plik i proces ma właściciela oraz zestaw praw dostępu
7. Standard POSIX – zgodność z określonymi normami systemowymi.
8. Stabilność i bezpieczeństwo – odporność na awarie i ataki.
9. Obsługa skryptów – automatyzacja zadań poprzez skrypty.
10. Przenośność – działanie na różnych architekturach sprzętowych.
Jak mniej więcej zbudowany jest każdy system unixowy?
UNIX zbudowany jest z:
- jądra,
- powłoki oraz
- innych podsystemów i programów realizujących określone usługi np.: wydruk, czy obsługę plików
.
Jądro (ang. kernel) systemu zawiera zbiór programów odpowiedzialnych za zarządzanie
zasobami, np.: to właśnie jądro systemu decyduje o podziale czasu CPU pomiędzy aktualnie wykonywane zadania. Po uruchomieniu komputera jądro przejmuje nad nim kontrolę. Komunikacja użytkownika z jądrem odbywa się poprzez powłokę.
Powłoka (ang. shell) systemu UNIX zapewnia kontakt użytkownika z jądrem systemu. Po
rozpoczęciu pracy przez użytkownika system przydziela mu jako obszar pracy katalog
domowy i uruchamia program powłoki.
Co to jest CPU?
A central processing unit, czyli procesor
Name popular desktop Linux environments.
Popular desktop Linux environments are the GNOME Shell, KDE Plasma Desktop, LXQt, Cinnamon, MATE and XfcE.
What is primary way of interacting with a Linux system?
Primary method of interacting with the Linux system, the console. The console is a text-based interface where an interactive shell runs. Here we typed commands for the shell to run and the shell displays any returned information to us also in text form.
What is shell?
The shell is the software we interact with using text commands and text outputs. There are a number of different shells out there with Bash being the most common. Other shells like Zshell, Cshell, fish, Kornshell and more can be found in different distros and they can all be installed on your system if you’d like to explore them
What is the console?
The console is a text-based interface where an interactive shell runs. Here we typed commands for the shell to run and the shell displays any returned information to us also in text form.
If the system is not running a graphical user interface and only has the text interface available, that’s considered a console.
there are terminal emulators which run on Windows and Mac iOS that you can use to connect to a remote Linux computer. If it’s running software like _________ provides remote access.
SSH or secure shell
What are GNU coreutils?
Software package called the GNU coreutils, short for core utilities. Many of these coreutils are commands that we’ll commonly use when working in a shell. Including commands to copy and move files, to change permissions and security contexts, to view some status information and so on. Humans use these, the command line, and scripts and other programs can use them as well, to perform basic tasks.
GNU Coreutils lub coreutils – zbiór podstawowych narzędzi do obsługi plików, powłoki i tekstu w systemach uniksopodobnych.
Przykładowe GNU:
cat, which we use to display file contents,
CP, which is for copying files,
DF and DU, which show information about how much space is used up on the file system
Do you know any alternative for GNU coreutils?
Well, most distros* use the GNU coreutils, some use a different set of tools called BusyBox. It’s an alternative to GNU coreutils and it’s often found in small, or embedded systems. What makes BusyBox interesting is that it’s a single program, which offers many of the functions of common coreutils tools. It also offers a wide array of other tools as well.
*distro (pl. dystrybucje) - a distributor or distributed version, especially of Linux software or of webzines.
What is FHS?
To store data on a Linux system, we use files, and files are organized into directories or folders as they are on other operating systems. These files and directories make up the file system. In order to organize files consistently on Linux systems, most distributions follow the Filesystem Hierarchy Standard, or FHS.
How files are organized in the Linux file system?
In the Linux file system, everything starts with the file system root, which is represented by a single slash. On a Linux system, there’s only one file system root.
You can think of the file system root kind of like the my computer level on a Windows system rather than the C drive.
How to find or plug in devices in the Linux system?
mnt or media are directories used for mounting or attaching other file systems, like you’d find on network shares and other disks
Where each user’s personal files are stored in the Linux system?
In the home directory
What is bin, sbin and usr are in FHS?
bin, sbin, and usr are directories where programs of different types are kept
Where system wide configuration files are stored?
In the etc directory
What is var in FHS?
And var is where changeable or variable system information is kept.
This is where we’ll find system logs and logs for other software
What are dev, proc, and sys directories? Are they really a directories?
These aren’t real directories at all. The dev, proc, and sys directories are created by the kernel to represent hardware available on the system, including all the systems hardware, processes that run programs, settings in the kernel, and so on.
“File system” has two meanings?
Yes. While the layout of the files and directories is called the file system, the term file system is also used to refer to different strategies or data structures for storing and representing file data and file metadata. Those are things like ext4, btrfs, ZFS, XFS, and so on.
Multi-user operating systems are normal these days. Linux, Windows, and macOS are all multi-user. Who is Superuser?
On Linux systems, there’s also a superuser or administrator account called root, which has the ability, or the privilege as it’s known in the security model, to access any file on the system and to change settings on a system wide basis.
We can use the root account directly, or we can borrow its privileges if the account we’re using is empowered to do so using the su command for substitute user or sudo, which we can use to run a particular command using superuser privileges to do a particular task while substituting the root user for our own. However, we’ll rarely if ever actively use the computer under the root account. Not only is it a bad idea, it can cause problems that are tricky to resolve. Root can be thought of as a powerful and special tool
What are file permissions on the Linux system? How they are represented?
Permissions let us indicate whether a user, members of a particular group, or anyone at all can read from a given file, write data to it, or execute or run it. Permissions are often represented either as numbers or as letters, and in each case, they’re made up of three sections, one for the user, one for the group, and one representing all others. Each section represents the restrictions applied to the file for that audience.
A desktop environment can make working with permissions a little bit easier, and to make changes at the command line, we’ll use the chmod command and sometimes chown and chgrp.
What security packages like SELinux and AppArmor provide?
SELinux i AppArmor zapewniają bardzo szczegółowe mechanizmy kontroli bezpieczeństwa dla programów i użytkowników.
SELinux and AppArmor can provide very detailed security constraints and controls that applied to programs and users alike.