What are the '10 mini-projects' created by engineers to fully understand the basic terms of Linux?


by

Adam Harvey

When using Linux, you will see words such as 'shell', 'grep', and 'process'. Engineer Carl Riis has learned the meaning and mechanism of such basic Linux terms from various websites, and has released the details as he improved his skills by creating '10 mini-projects'.

Getting better at Linux with 10 mini-projects --carltheperson
https://carltheperson.com/posts/10-things-linux

GitHub --carltheperson / 10-things-linux: Getting better at Linux with 10 mini-projects.
https://github.com/carltheperson/10-things-linux

◆ 01: UNIX
Since Linux is a UNIX - like operating system (OS) , Mr. Riis first learned on Wikipedia to understand UNIX. He also read the following original treatise by UNIX developers Dennis Ritchie and Ken Thompson .

Untitled Document --unix.pdf
(PDF) https://people.eecs.berkeley.edu/~brewer/cs262/unix.pdf

As a learning output, Riis developed 'Recat' in C language according to UNIX philosophy. Recat is a 'reverse string' program, implemented based on the ' cat ' command that displays the contents of a file.

10-things-linux / recat.c at master · carltheperson / 10-things-linux · GitHub
https://github.com/carltheperson/10-things-linux/blob/master/1_UNIX__Recat/recat.c



◆ 02: Shell
Riis then began learning about '

shells ' such as ' Bash ' and ' zsh '. Mr. Riis said that he could not distinguish between shell and terminal , but UNIX treatises and the following websites helped him learn. The shell is a bridge between the user and the kernel, and the terminal is software that emulates a terminal dedicated to screen display.

Unix / Linux --What is Shells? --Tutorialspoint
https://www.tutorialspoint.com/unix/unix-what-is-shell.htm

Learning the shell --Lesson 1: What is the shell?
https://linuxcommand.org/lc3_lts0010.php

Riis has developed and published his own shell called 'Sea Shell' as an output of understanding the shell.

10-things-linux / 2_What_is_a_shell__SeaShell at master · carltheperson / 10-things-linux · GitHub
https://github.com/carltheperson/10-Things-Linux/tree/master/2_What_is_a_shell__SeaShell



◆ 03: Owner and authority
Ownership and permissions are very important concepts in Linux, but Riis wasn't very interested in security, so his knowledge wasn't well established. Certainly, Linux permissions have some parts that are difficult to understand intuitively, such as '755' and '644'. Mr. Riis proceeded with the learning by referring to the following website.

Understanding Basic File Permissions and ownership in Linux – The Geek Diary

https://www.thegeekdiary.com/understanding-basic-file-permissions-and-ownership-in-linux/

Riis has developed and released software called 'Tellaccess' that can intuitively display the owner and authority.

10-things-linux / 3_Ownership_and_permissions__Tellaccess at master · carltheperson / 10-things-linux · GitHub
https://github.com/carltheperson/10-Things-Linux/tree/master/3_Ownership_and_permissions__Tellaccess



◆ 04:

grep
grep is a typical command used when searching data on Linux. Mr. Riis said that he browsed Wikipedia and the man page that corresponds to the command manual in order to learn the regular expressions used when narrowing down the search conditions with grep.

Man page of GREP
https://linuxjm.osdn.jp/html/GNU_grep/man1/grep.1.html

As a project related to grep, Riis has published 'Grep detective' that searches for information based on hints with the grep command.

10-things-linux / 4_Grep__Grep_detective at master · carltheperson / 10-things-linux · GitHub
https://github.com/carltheperson/10-Things-Linux/tree/master/4_Grep__Grep_detective



◆ 05: awk and sed
Even if Riis found a crazy one-liner including awk and sed on Stack Overflow , he used it by copying and pasting without thinking deeply about its contents.

A person who can realize any processing with a single liner by combining awk and sed in a complicated way, which Riis describes as 'crazy', is sometimes called a 'shell entertainer'.

[Road to shell entertainer] The first step of shell entertainer --Qiita
https://qiita.com/t_nakayama0714/items/bfe4852e0535858ee662



The following New York University treatises helped me learn the awk and sed commands, Riis said.

grep_awk_sed.pdf
(PDF)

https://www-users.york.ac.uk/~mijp1/teaching/2nd_year_Comp_Lab/guides/grep_awk_sed.pdf

As a result of learning, Riis has released a one-liner 'Passwdinfo' of awk and sed commands that can display user information.

10-things-linux / 5_Awk_and_sed__Passwdinfo at master · carltheperson / 10-things-linux · GitHub
https://github.com/carltheperson/10-Things-Linux/tree/master/5_Awk_and_sed__Passwdinfo



◆ 06: find
Like grep, awk, and sed, the find command is a data search command that is often used in Linux. It seems that learning the find command was easy for Mr. Riis, and the following website was useful for remembering the optional format.

Use the Unix find command to search for files
https://kb.iu.edu/d/admm

As a result of learning, Riis has released a game 'Find treasure hunt' that finds files that are 'treasure' hidden deep in a complicated directory structure.

10-things-linux / 6_Find__Find_treasure_hunt at master · carltheperson / 10-things-linux · GitHub
https://github.com/carltheperson/10-Things-Linux/tree/master/6_Find__Find_treasure_hunt

◆ 07: File system
Riis says that the following websites, which show the structure in an easy-to-understand diagram, were helpful in learning the directory structure of Linux such as 'bin' and 'sys'.

The Linux Filesystem Explained --Linux.com
https://www.linux.com/training-tutorials/linux-filesystem-explained/

The file system structure of Linux differs depending on the distribution, but it is basically an extension of the Filesystem Hierarchy Standard (FHS) . The FHS stipulates 'what is this directory used for' and 'which directory is a required directory'.

The file system mini-project describes each directory in the root folder.

10-things-linux / 7_File_system__Root_tour at master · carltheperson / 10-things-linux · GitHub

https://github.com/carltheperson/10-Things-Linux/tree/master/7_File_system__Root_tour



◆ 08: Process
Riis said he had never learned about the Linux process. The article that even Mr. Riis introduced as 'easy to understand' is as follows.

Processes in Linux / Unix --GeeksforGeeks

https://www.geeksforgeeks.org/processes-in-linuxunix/

As a result of the learning, Riis developed a command 'Stranger danger' that displays all processes that do not belong to you or root.

10-things-linux / 8_Processes__Stranger_danger at master · carltheperson / 10-things-linux · GitHub
https://github.com/carltheperson/10-things-linux/tree/master/8_Processes__Stranger_danger



◆ 09: systemd
In the past,

SysV Init was the mainstream process boot system for Linux, but at the time of writing the article, systemd was widespread. Wikipedia and the following pages helped me learn systemd, Riis said.

How to Create and Run New Service Units in Systemd Using Shell Script
https://www.tecmint.com/create-new-service-units-in-systemd/

As a project, 'Creat service' was born, which allows you to create a systemd unit file from an executable file.

10-things-linux / 9_Systemd_services__Createservice at master · carltheperson / 10-things-linux · GitHub
https://github.com/carltheperson/10-Things-Linux/tree/master/9_Systemd_services__Createservice



◆ 10: Bash script
Riis has long avoided Bash scripts because they are 'badly syntactic' and 'Go is better'. Certainly, it seems a bit old to see the sentence that closes the 'case' statement with 'esac' in the Bash script, but Riis thought that he would not know until he actually tried it, so he decided to learn the Bash script. did.

It seems that the following cheat sheets were useful for learning.

Bash scripting cheatsheet

https://devhints.io/bash

As a project, Riis has released a cipher program called 'Penguin cipher' named after the Linux mascot.

10-things-linux / 10_Bash_scripting__Penguin_cipher at master · carltheperson / 10-things-linux · GitHub
https://github.com/carltheperson/10-Things-Linux/tree/master/10_Bash_scripting__Penguin_cipher

in Software, Posted by darkhorse_log