Geavanceerd
Zoeken inSamenvattingen
Zo zoek je
  • Woorden vinden lestitels, tekst en code. Filter op soort (gidsen, cursussen, programma's, boeken) of blijf in dit boek.
  • book:rhcsa en ch:8 maken de zoektocht kleiner; #code vindt een woord alleen in commando's van de lessen.
  • "twee woorden" vindt precies die zin.
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken
Probeer:

Cursus 1Naam in de cursus: Linux for Absolute Beginners

Linux for Absolute Beginners

Course 1 of 13 in the Alta3 Academy library. Alta3 Academy self-paced course.

Notitie

My result — Lessons read: all 48/48; Course progress: 100%.

  • 19 Lessen
  • 68 Commando's
  • 2 Labs

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

$ als gewone gebruiker# als root (of met sudo)

1.1

What the course covers

This course is a first step into Linux. You do not need any past experience.

  • It uses Red Hat Enterprise Linux (RHEL) in the lab.
  • You learn to move around the command line with bash.
  • You work with files: create, copy, move, look inside, and delete them.
  • You learn users, groups, passwords, and file permissions.
  • You look at processes, services, boot targets, logs, and SSH.
  • You set up the network with nmcli and dnf packages.
  • You finish with LVM storage: physical volumes, volume groups, and logical volumes.

1.2

Prefix Chapters

Four short lessons before the real work starts. They cover the poll, the coach, and the live class.

  • VIRGIL is the lab coach. It sits in the lab and helps you when you get stuck.
  • tmux keeps many shells in one window. Press Ctrl + B, let go, then press the next key.
  • In tmux: % splits left and right, " splits top and bottom, arrows move, z zooms, [ scrolls back.
  • To paste in the lab terminal: right-click Paste, or Shift + Insert, or Ctrl + Shift + V.

1.3

Get Started with Red Hat Enterprise Linux

Linux is an open-source operating system. It runs on servers and on many other devices.

1.4

Fundamentals of Command Line Operations

bash reads what you type and runs it. The prompt shows user@host:~$.

  • ~ is your home folder. $ means a normal user. Root sees #.
  • pwd shows where you are. ls lists files. ls -a shows hidden files. ls -l shows details.
  • cd changes folder. cd .. goes up one level. cd ~ goes home. history shows your past commands.
  • touch makes an empty file. echo "text" > file writes a file. cp copies, mv moves or renames, rm deletes.
  • cp -r copies a whole folder. rm -r deletes a folder.
  • Linux has one tree. Everything starts at / (root). Common folders: /home, /etc, /var, /usr, /tmp.
  • An absolute path starts with /. A relative path starts from where you are now.
  • cat prints a file. less pages through it. head shows the top. tail shows the end.
  • Redirection: > writes, >> adds, 2> sends errors, &> sends both. | sends output into the next command.
  • Example: ls > directory_list.txt saves the list. ls | grep "log" filters it.

1.5

Help Systems in Red Hat Enterprise Linux

man ls opens the manual page for ls. Press q to leave.

  • Man pages are split into sections. man 1 passwd picks section 1 (commands).
  • man -k network or apropos network searches by keyword.
  • command --help gives a short list of options.
  • Files in /usr/share/doc give more detail.

1.6

Text File Management

vim is a modal editor. i starts typing. Esc stops typing.

  • :wq saves and quits. :q! quits and drops changes. G jumps to the end of the file. A jumps to the end of the line and starts typing.
  • grep "root" /etc/passwd finds a word in a file.
  • Useful grep flags: -i ignore case, -n line numbers, -r search folders, -c count, -v invert, -w whole word.
  • diff file1 file2 shows what changed. diff -u gives a unified view. cmp says if two files differ.
  • Regex: ^ start, $ end, . one character, [aeiou] a set, [^0-9] not a digit, * repeat.

Commando's in deze les

1.7

User and Group Management

Every file has an owner and a group. root is the superuser.

1.8

File Permissions and Security

ls -l shows -rw-r--r--. The first - is the file type. Then come user, group, and other rights.

1.9

Process Management

A process is a running program. Every process has a PID.

1.10

Managing Services and Daemons

A daemon is a background program. A service is a daemon that systemd controls.

1.11

SSH Configuration and Security

SSH lets you log in to a remote machine over an encrypted link.

1.12

Log Management

Logs live in /var/log. There you find messages, secure, and the journal folder.

  • journalctl reads the systemd journal. -b shows this boot. -b -1 shows the last boot.
  • journalctl --since today and --since "1 hour ago" filter by time.
  • journalctl -u sshd -b shows one service for this boot.
  • logrotate stops logs from filling the disk. Main config: /etc/logrotate.conf. Extra files: /etc/logrotate.d/.
  • Common rules: daily, rotate 7, compress, and notifempty.

1.13

Networking in Red Hat Enterprise Linux

Every host needs an IP address, a gateway, and a DNS server.

1.14

Package Management

dnf installs, updates, and removes software on RHEL.

Commando's in deze les

1.15

File System Management

LVM puts a flexible layer between the disk and the file system.

1.16

Key commands and tools

1.17

Key terms

The words of this course in one table. Learn them before the quiz or exam.

TermMeaning
Absolute pathA full path that starts with /.
ACLAccess Control List. Extra permissions for more users or groups.
BashThe shell that reads what you type and runs the command.
Boot targetThe state the system boots into, such as multi-user or graphical.
DaemonA program that runs in the background.
DNSThe service that turns a name into an IP address.
GroupA set of users. A group makes it easy to share files.
Home directoryYour own folder, usually /home/yourname. The ~ sign means home.
JournalThe systemd log. Read it with journalctl.
LinuxAn open-source operating system. The course uses it on servers.
LVMLogical Volume Management. It puts a flexible layer over disks.
man pageThe built-in manual of a command. Open it with man command.
NetworkManagerThe service that manages network links. nmcli and nmtui control it.
PermissionsThe read (r), write (w), and execute (x) rights on a file.
PIDThe number that names a process.
PipelineA / between two commands. The first output becomes the second input.
ProcessA running program.
PromptThe text before your cursor. It shows user@host and the current folder.
RedirectionSending output or errors to a file with >, >>, 2>, or &>.
Regular expressionA text pattern. ^ is the line start, $ is the line end.
Relative pathA path that starts from the folder you are in now.
RHELRed Hat Enterprise Linux. The Linux version in the lab.
ServiceA daemon that systemd starts, stops, and watches.
SSHSecure Shell. It gives you an encrypted login on a remote machine.
UserA named account on the system.

Oefenen

Alle commando's in dit hoofdstuk