0% found this document useful (0 votes)
56 views11 pages

1.2 Workbook - 101

This document provides instructions for completing 29 tasks to help consolidate knowledge learned from an LPIC-1 exam preparation course. The tasks cover a range of Linux system administration topics like checking the kernel version, managing services, partitioning and formatting disks, file permissions, and more. The document encourages practicing tasks hands-on without solutions first, then provides the solutions on the last pages to check work.

Uploaded by

Bharath Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views11 pages

1.2 Workbook - 101

This document provides instructions for completing 29 tasks to help consolidate knowledge learned from an LPIC-1 exam preparation course. The tasks cover a range of Linux system administration topics like checking the kernel version, managing services, partitioning and formatting disks, file permissions, and more. The document encourages practicing tasks hands-on without solutions first, then provides the solutions on the last pages to check work.

Uploaded by

Bharath Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Workbook for Exam LPIC-1 - 101

Welcome to this handy workbook with a few interesting tasks that it has to be carried out or solved.
The workbook was created so that things that have been learned can be consolidated even better by
namely, doing it in practice and having to think about something yourself.
At this point I strongly recommend not to use the vocabulary PDF as an aid. It is better to find the
solution by trying it out and by studying the respective manual page.
So you are forced to deal much more intensively with the matter, which ultimately makes it easier
for you to keep it in mind.

Some of the questions will seem like the questions in the quizzes in the course, but remember:
Firstly, there are no given answer options and secondly, it is intended that you do everything
practically.

The solutions to all tasks can be found on the last pages of this PDF. I recommend that you use
these solutions only to check your own results.
If you cannot solve one or more practical tasks, you could of course use the solutions on the last
side but I recommend to watch the regarding videos and then try to solve the problem again.

In the end, of course, it is up to you how you want to use this workbook.

And now have fun and good luck ...


Task 1:
Which kernel version is installed / active on your (virtual) Linux system?
Use at least 3 ways to find out.

Task 2:
What byte order does your CPU use?

Task 3:
Who is the author of the mouse module your kernel uses?

Task 4:
Check if the firewall module is currently loaded into the kernel. If so, delete it from the
Kernel, check whether it is really stopped and then reload it into the kernel.

Task 5:
Search the kernel ring buffer for error messages.

Task 6:
Install the web server nginx and then check whether it was started automatically or not.
If not, start it. If so, restart it.

Task 7:
List all systemd processes and save the result in a file.

Task 8:
Restart the system (with boot target).
Task 9:
View the SWAP partitions or files used. Turn off the SWAP partition or file, check whether it is
switched off and then switch it on again.

Task 10:
View all hard drives on the system. Preferably so that the information is easy to read.

Task 11:
Prüfe welche Bibliotheken das Kommando chmod verwendet.

Task 12:
Führe ein komplettes Systemupdate durch (Ubuntu).

Task 13:
Which command did you use tenth-last? Use 2 ways to find this out.

Task 14:
Create a variable named VARIABLE1 and assign it the value 25. Make sure the Variable is
inherited in a new bash and check if it works.

Task 15:
Display the last 50 lines of the log file / var / log / syslog. No more and no Less.

Task 16:
Open the file /var/log/syslog and display the line numbers. Choose two different ways for it.
Task 17:
Use vi to create a table with any number of rows and at least 5 columns. Separate the columns with
a semicolon.
Save the file.
Now replace all semicolons in the file with commas. Then only display columns 1, 2 and 4 of the
table.

Task 18:
Set the timestamp of the table file to 01/01/2020.

Task 19:
Erstelle ein Verzeichnis test und dort das Unterverzeichnis test2.

Task 20:
Use the find command to search for all log files on the system.

Task 21:
Make a backup of your bootloader.

Task 22:
Create 2 files with any name.
Create an archive compressed with xz from these 2 files. Then read the content of the archive
without extracting it.

Task 23:
Run the command ls -la and redirect both STDOUT and STDERR to the list.txt file.

Task 24:
How big is the RAM available on your system? Display the result in gigabytes.
Task 25:
What is the process ID of nginx (should you have installed in task 6)?
What ways are there to find out?

Task 26:
Create a new hard drive with a size of 1 GB in the Virtualbox settings.
After the system start, check whether the new hard drive is present.
Create a partition on the hard drive and format it with the ext4 file system.
Then mount the partition in the system. Use the mountpoint /mnt/new_hdd.

Task 27:
Set the new partition to run a file system check every 30 days.

Task 28:
Create a file and give it permission 444. Also change the owner to root.

Task 29:
Display the used and free inodes of the new hard drive.
Answer Section

Task 1:
1. uname -r - shows the active kernel version
2. uname -a - shows, among other things, the active kernel version
3. ll /boot - the /boot directory contains the static part of the kernel, among other things. From the
Files can be read off the version number
4. ll /usr/lib/modules - contains the kernel modules. Here you can also see the version number.

Task 2:
The byte order can easily be read off with the lscpu command.

Task 3:
To find out the exact name of the mouse module, you can use the command lsmod. In the list you
then look for a module that contains the word "mouse". In my case the module is called "psmouse".
With modinfo -a psmouse I can display the author of the module.

Task 4:
We use the lsmod command again and see which modules are running. The Linux firewall is called
"ip tables", so we can search for example as follows: lsmod | grep -i tables.
To delete ip tables from the kernel we can use the following command:
sudo modprobe -r ip_tables.
To load ip_tables back into the kernel, we use: sudo modprobe ip_tables.

Task 5:
dmesg | grep -i error

Task 6:
First you should find out what the package is called exactly. On an Ubuntu system you can
find out with: apt-cache search nginx.
Obviously the package is just called nginx. The installation is carried out as follows:
apt install nginx.
After the installation we check with systemctl whether nginx has been started:
systemctl status nginx.
Nginx is started or restarted with: systemctl start nginx / nginx restart nginx.
Task 7:
systemctl list-units > file

Task 8:
systemctl isolate reboot.target

Task 9:
swapon -s = Shows the used SWAP partitions or files.
swapoff -a = Switches off all SWAP partitions or files
swapon -a = Switches on all SWAP partitions or files

Task 10:
df -h

Task 11:
First we need the path of chmod: which chmod.
With ldd we can then display the libraries: ldd /usr/bin/chmod

Task 12:
sudo apt update - Updates the repository list
sudo apt dist-upgrade - Updates the entire system

Task 13:
history
cat ~/.bash_history
Task 14:
export VARIABLE1=25
bash
echo $VARIABLE1

Task 15:
tail -n 50 /var/log/syslog

Task 16:
1. nl /var/log/syslog
2. vi /var/log/syslog -> :set number

Task 17:
cat table.csv | tr ';' ','
cut -d ';' -f 1,2,4 table.csv

Task 18:
touch -t 202001010000 table.csv

Task 19:
mkdir -p test/test2

Task 20:
sudo find / -name *.log

Task 21:
dd if=/dev/sda of=backup_bootloader bs=512 count=1
Task 22:
touch file1 file2
tar -cvJf file3.tar.xz file1 file2
tar tJf file3.tar.xz

Task 23:
ls -la > list.txt 2>&1

Task 24:
free -g

Task 25:
ps -ef | grep nginx
pstree -p | nginx
pgrep nginx
top (search for nginx)

Task 26:
Create a new hard drive in the Virtualbox settings. Then restart the system.
With fdisk -l you can determine whether the new HDD is also available.
Assuming the new HDD is now called /dev/sdb, use fdisk with this new hard drive:
fdisk /dev/sdb. Create a new partition (83).
Format it with the ext4 filesystem: mkfs.ext4 /dev/sdb1 or mkfs -t ext4 /dev/sdb1.
Create the mount point: sudo mkdir /mnt/new_hdd.
Attach the new HDD to the mount point: sudo mount -t ext4 /dev/sdb1 /mnt/new_hdd.

Task 27:
sudo tune2fs -i 30d /dev/sdb1

Task 28:
touch file
chmod 444 file
chown root:root file
Task 29:
df -i /dev/sdb1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy