1
0
Fork 0
mirror of https://codeberg.org/Mo8it/How_To_Linux.git synced 2024-11-22 05:18:04 +00:00

Fix typos

This commit is contained in:
Mo 2022-08-24 11:23:02 +02:00
parent e009156b6c
commit 434f30091f
4 changed files with 8 additions and 8 deletions

View file

@ -14,7 +14,7 @@ By entering `cowsay "Hello" | lolcat`, the output of the first command `cowsay`
`lolcat` takes the input, colors it and outputs it again! `lolcat` takes the input, colors it and outputs it again!
Many Linux commands support handeling input of another command. Many Linux commands support handling input of another command.
You might have seen in the manual of `wc` in day 1 that the file as an argument is only optional. How could you use `wc` without arguments? You might have seen in the manual of `wc` in day 1 that the file as an argument is only optional. How could you use `wc` without arguments?
@ -62,7 +62,7 @@ You can see that you can use multiple pipes. This allows for almost infinite com
Being able to combine commands is the reason why many commands are simple. They do one thing and do it well! To do more, combine them! Being able to combine commands is the reason why many commands are simple. They do one thing and do it well! To do more, combine them!
This is much more flexibel and powerful that a program that tries to do a lot of things. This is much more flexible and powerful that a program that tries to do a lot of things.
## Input, output ## Input, output
@ -153,7 +153,7 @@ Now run `chmod +x which-os.sh`. Then run `./which-os.sh`.
--- ---
I am really sorry, but I can not continue this book during the course. It was not only meant for the couse but also like a personal project that I wanted to keep on the internet even after the course. I am really sorry, but I can not continue this book during the course. It was not only meant for the course but also like a personal project that I wanted to keep on the internet even after the course.
But I did underestimate the huge amount of time it takes to write such a book/script. But I did underestimate the huge amount of time it takes to write such a book/script.

View file

@ -10,7 +10,7 @@ In this task, we want to write our own job scheduler.
Understanding how job schedulers work is important when you are working on a computer cluster. Understanding how job schedulers work is important when you are working on a computer cluster.
Computer clusters are shared by many users. Therefore, running jobs on a cluster has to be scheduled to make sure that the resources are shared probebly. Computer clusters are shared by many users. Therefore, running jobs on a cluster has to be scheduled to make sure that the resources are shared probably.
In this task, we will keep it simple. No aspects of multiple users or any optimizations. In this task, we will keep it simple. No aspects of multiple users or any optimizations.
@ -28,9 +28,9 @@ We will use the program `inotifywait`. This program can monitor a directory and
1. Create a file **outside** of the directory `jobs` and then copy it to the directory `jobs`. 1. Create a file **outside** of the directory `jobs` and then copy it to the directory `jobs`.
1. Go back to the first terminal and see the output of `inotifywait` was. 1. Go back to the first terminal and see the output of `inotifywait` was.
1. Based on the output, choose an event that you want to listen to with `inotifywait` that tells you when a file is _completely_ added to the directory `jobs`. Use the manual to read more about specific events. 1. Based on the output, choose an event that you want to listen to with `inotifywait` that tells you when a file is _completely_ added to the directory `jobs`. Use the manual to read more about specific events.
1. Find an option that lets you tell `inotifywait` to only notify when the choosen event occurs. 1. Find an option that lets you tell `inotifywait` to only notify when the chosen event occurs.
1. Find an option that lets you format the output of the notification of `inotifywait`. Since we only listen on one event and monitor only one directory, an output that shows only the name of the new file should be enough. 1. Find an option that lets you format the output of the notification of `inotifywait`. Since we only listen on one event and monitor only one directory, an output that shows only the name of the new file should be enough.
1. Enter the command that you have until now in a script. Now extend it by using a `while` loop that continously listens on the notifications of `inotifywait`. Use the following snippet while replacing the sections with `(...)`: 1. Enter the command that you have until now in a script. Now extend it by using a `while` loop that continuously listens on the notifications of `inotifywait`. Use the following snippet while replacing the sections with `(...)`:
```bash ```bash
inotifywait (...) | while read FILENAME inotifywait (...) | while read FILENAME
do do

View file

@ -142,7 +142,7 @@ ssh HOST
> WARNING ⚠️ : > WARNING ⚠️ :
> >
> Verify that you are only asked for the passphrase of the SSH key before continueing in this section! > Verify that you are only asked for the passphrase of the SSH key before continuing in this section!
> >
> If you are asked for the password of the user on the server when connecting, then the authentication with a key did not work. Therefore, don't set `PasswordAuthentication no`! Fix the issue with the key authentication first. **Otherwise, you will be locked out of the server!** ⚠️ > If you are asked for the password of the user on the server when connecting, then the authentication with a key did not work. Therefore, don't set `PasswordAuthentication no`! Fix the issue with the key authentication first. **Otherwise, you will be locked out of the server!** ⚠️

View file

@ -98,7 +98,7 @@ After that I add you public key, connect to the server using the host name that
1. `cd` to the home directory of the new user. 1. `cd` to the home directory of the new user.
1. Make sure that you are in the home directory of the new user! Run `pwd` to verify that you are NOT in `/home/admin`. **`PLEASE DON'T TOUCH /home/admin/.ssh`** ⚠️ . Now, create the directory `~/.ssh` in the home directory of the new user. Change the permissions of `~/.ssh` such that only the user has read, write and execution permissions. _group_ and _others_ should have no permissions for `~/.ssh`! 1. Make sure that you are in the home directory of the new user! Run `pwd` to verify that you are NOT in `/home/admin`. **`PLEASE DON'T TOUCH /home/admin/.ssh`** ⚠️ . Now, create the directory `~/.ssh` in the home directory of the new user. Change the permissions of `~/.ssh` such that only the user has read, write and execution permissions. _group_ and _others_ should have no permissions for `~/.ssh`!
1. Create the file `authorized_keys` inside `~/.ssh`. Only the user should have read and write permissions for the file. _group_ and _others_ should have no permissions for the file! 1. Create the file `authorized_keys` inside `~/.ssh`. Only the user should have read and write permissions for the file. _group_ and _others_ should have no permissions for the file!
1. Copy the content of your public key file (with `.pub` as extention) to this file. It should be one line! Then save the file. 1. Copy the content of your public key file (with `.pub` as extension) to this file. It should be one line! Then save the file.
1. Logout from the server. Go to `~/.ssh/config` that you did write at the beginning of this task. Change the user for the host `linux-lab` from `admin` to `USERNAME` where `USERNAME` is the name of the new user that you did create on the server. 1. Logout from the server. Go to `~/.ssh/config` that you did write at the beginning of this task. Change the user for the host `linux-lab` from `admin` to `USERNAME` where `USERNAME` is the name of the new user that you did create on the server.
1. Try to connect using the host name again. If you did everything right, you should be connected and be the user that you did create. Run `whoami` to verify that the output is not "admin". 1. Try to connect using the host name again. If you did everything right, you should be connected and be the user that you did create. Run `whoami` to verify that the output is not "admin".