mirror of
https://codeberg.org/Mo8it/How_To_Linux.git
synced 2024-12-05 01:40:32 +00:00
Compare commits
2 commits
30f3459847
...
483a138fb6
Author | SHA1 | Date | |
---|---|---|---|
483a138fb6 | |||
690c609c27 |
4 changed files with 67 additions and 6 deletions
|
@ -6,6 +6,7 @@
|
||||||
- [Why learn Linux?](day_1/why_linux.md)
|
- [Why learn Linux?](day_1/why_linux.md)
|
||||||
- [Terminal basics](day_1/terminal_basics.md)
|
- [Terminal basics](day_1/terminal_basics.md)
|
||||||
- [Packages](day_1/packages.md)
|
- [Packages](day_1/packages.md)
|
||||||
|
- [Tasks](day_1/tasks.md)
|
||||||
- [Day 2](day_2/README.md)
|
- [Day 2](day_2/README.md)
|
||||||
- [Day 3](day_3/README.md)
|
- [Day 3](day_3/README.md)
|
||||||
- [Day 4](day_4/README.md)
|
- [Day 4](day_4/README.md)
|
||||||
|
|
|
@ -22,7 +22,7 @@ If you are using another Linux distribution, you might need to replace the comma
|
||||||
|
|
||||||
It is important to understand the functionality of package managers. Then you can transfer this knowledge to other package managers if required. This applies to some other aspects in Linux too, since _the Linux operating system_ does not exist. There are distributions that bundle a set of software and differ in small ways.
|
It is important to understand the functionality of package managers. Then you can transfer this knowledge to other package managers if required. This applies to some other aspects in Linux too, since _the Linux operating system_ does not exist. There are distributions that bundle a set of software and differ in small ways.
|
||||||
|
|
||||||
To install a package, you need adminstrative priviliges. Therefore, we need some `sudo` powers. `sudo` will be explained in the next section.
|
To install a package, you need administrative privileges. Therefore, we need some `sudo` powers. `sudo` will be explained in the next section.
|
||||||
|
|
||||||
Lets install our first package! To do so, enter `sudo dnf install cmatrix`. You will be asked for the password of your user. Type the password and then press `Enter`. For security reasons, you will not be able to see you password while entering it. So don't wonder why nothing happens while typing the password. Just type it and then press `Enter`.
|
Lets install our first package! To do so, enter `sudo dnf install cmatrix`. You will be asked for the password of your user. Type the password and then press `Enter`. For security reasons, you will not be able to see you password while entering it. So don't wonder why nothing happens while typing the password. Just type it and then press `Enter`.
|
||||||
|
|
||||||
|
@ -49,15 +49,15 @@ $ dnf install cowsay
|
||||||
Error: This command has to be run with superuser privileges (under the root user on most systems).
|
Error: This command has to be run with superuser privileges (under the root user on most systems).
|
||||||
```
|
```
|
||||||
|
|
||||||
You can see that you get an error resulted by a lack of priviliges for running this command.
|
You can see that you get an error resulted by a lack of privileges for running this command.
|
||||||
|
|
||||||
Any action that might modify the system needs adminstrative priviliges. Installing a package (system-wide) is one of these actions.
|
Any action that might modify the system needs administrative privileges. Installing a package (system-wide) is one of these actions.
|
||||||
|
|
||||||
Sometimes, an action might not modify the system, but a user might be restricted through the permissions system to not be able to access a file for example. In this case, you would also need to use `sudo`.
|
Sometimes, an action might not modify the system, but a user might be restricted through the permissions system to not be able to access a file for example. In this case, you would also need to use `sudo`.
|
||||||
|
|
||||||
Linux has a superuser, one user that exists on every Linux system and is able to do anything! This user is the `root` user. For security reasons (and also to not do something distructive by a mistake), this user is often locked. `sudo` allows you as a non root user to run your command as a `root` user.
|
Linux has a superuser, one user that exists on every Linux system and is able to do anything! This user is the `root` user. For security reasons (and also to not do something destructive by a mistake), this user is often locked. `sudo` allows you as a non root user to run your command as a `root` user.
|
||||||
|
|
||||||
You are not alway allowed to use `sudo`. If you don't own the machine you are using and just share it with others, then there is a high chance that only adminstrators of the machine have `sudo` access.
|
You are not always allowed to use `sudo`. If you don't own the machine you are using and just share it with others, then there is a high chance that only administrators of the machine have `sudo` access.
|
||||||
|
|
||||||
If you don't have access to `sudo` and try to use it, then you get an output like this:
|
If you don't have access to `sudo` and try to use it, then you get an output like this:
|
||||||
|
|
||||||
|
|
60
src/day_1/tasks.md
Normal file
60
src/day_1/tasks.md
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
# Tasks
|
||||||
|
|
||||||
|
## Task 1: Building houses
|
||||||
|
|
||||||
|
In this task, you will build a house with different rooms using (nested) directories.
|
||||||
|
|
||||||
|
Start with an empty directory as the house and add directories to it as rooms.
|
||||||
|
|
||||||
|
The house should have at least 5 rooms. Give the rooms meaningful names.
|
||||||
|
|
||||||
|
Place a box as a text file in one of the rooms. Put some content in the box as text lines.
|
||||||
|
|
||||||
|
Place some persons as text files in different rooms. You can add some information about the persons like hobbies in their files.
|
||||||
|
|
||||||
|
Visualise your house structure and content using `tree` and make a screenshot.
|
||||||
|
|
||||||
|
Now, clone your whole house and then rename the persons in the new house. Make another screenshot of `tree` afterwards.
|
||||||
|
|
||||||
|
In the new house, choose a non empty room and move everything with this room into another room. Why? Because zombies are back! They did get in through the window...
|
||||||
|
|
||||||
|
Make a screenshot of `tree`.
|
||||||
|
|
||||||
|
Put some zombies in this room after it is empty, make a screenshot of `tree` and then delete the room with the zombies in it. Make sure to not destroy the whole house!
|
||||||
|
|
||||||
|
Make a final `tree` screenshot of the rest of the house.
|
||||||
|
|
||||||
|
Take a screenshot of the content of some files. Tipp: 😺
|
||||||
|
|
||||||
|
- If you somehow get lost, use `pwd`.
|
||||||
|
- If you need are looking for an option but you can not remember it, use `--help`.
|
||||||
|
|
||||||
|
## Task 2: Reset your password
|
||||||
|
|
||||||
|
Use the command `passwd` to reset the password of your user. It is important to have a secure password!
|
||||||
|
|
||||||
|
## Task 3: Update your system
|
||||||
|
|
||||||
|
Find out how to update your system with `dnf` and run the updates.
|
||||||
|
|
||||||
|
Before you confirm, make sure that you read what packages are updated. Make a screenshot of the changes.
|
||||||
|
|
||||||
|
It is possible that you don't find any update. In this case, you can try it tomorrow again!
|
||||||
|
|
||||||
|
## Task 4: Package installation and usage
|
||||||
|
|
||||||
|
Install the package `cowsay` and find out how to use it!
|
||||||
|
|
||||||
|
Spoiler: You will have to deal with some cows 🐄
|
||||||
|
|
||||||
|
Find out how to give a fancy tongue and shinny eyes.
|
||||||
|
|
||||||
|
Make a screenshot of some cow wisdom 🐮
|
||||||
|
|
||||||
|
Now install the package `lolcat`.
|
||||||
|
|
||||||
|
Lets call the wisdom command you did take the last screenshot of `COMMAND`.
|
||||||
|
|
||||||
|
Now run `COMMAND | lolcat`. Describe what did change. Can you guess how this does internally work?
|
||||||
|
|
||||||
|
Now read the help of `lolcat` and find out how you add some randomness. Run the command above again with the option you found and take a screenshot after you are satisfied with the randomness you get.
|
|
@ -399,7 +399,7 @@ You might think that you don't need autocompletion at all. But you should use it
|
||||||
|
|
||||||
When you type `cat hapy_house/ru` and then press `Tab`, you don't get any autocompletion although you would expect it. But did you notice the missing `p` in `happy`?
|
When you type `cat hapy_house/ru` and then press `Tab`, you don't get any autocompletion although you would expect it. But did you notice the missing `p` in `happy`?
|
||||||
|
|
||||||
This is what is ment by verification. If you don't get an autocompletion although you think that you should, then check what you have typed so far. It is much easier to correct things this way that having to correct them after trying to run the command.
|
This is what is meant by verification. If you don't get an autocompletion although you think that you should, then check what you have typed so far. It is much easier to correct things this way that having to correct them after trying to run the command.
|
||||||
|
|
||||||
But what if you did run a command with a mistake and you have to correct it? Or what if you want to run the same command with small modifications? Do you have type the whole command again?
|
But what if you did run a command with a mistake and you have to correct it? Or what if you want to run the same command with small modifications? Do you have type the whole command again?
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue