
I forgot to keep a record yesterday, so today I'm keeping a record for both days.
The 9th episode will be on July 11, 2018, and episodes 10 to 12 will be on July 12. It's fun because it gives detailed explanations of the commands that we used to use without understanding them a while ago.
Let's keep going and finish it. I wonder if I should take the LPIC exam... 30,000 yen...
## lpic preparation lesson 9th
What is the PATH environment variable?
It affects external commands. The PATH variable tells you "this command is here!"
List the directory candidates. You can see a neat list with the above command.
$ echo $PATH | sed 's/:/\n/g'
/home/xxx/bin
/home/xxx/.local/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
This list is checked from the top down, and if a command is found, it is executed.
If you want to add, type the following command. (If you assign it directly, it will be overwritten, so assign the additional information.) Separate directories with a colon.
PATH=$PATH:/user/local/bin
## Library
Static libraries.
It's like a function. It doesn't matter to the user which one it is...
### static library
### Dynamic Shared Library
Shared libraries.
Called when the program is run.
## LDD command
$ ldd /bin/bash
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
The library is on the left. The location is on the right. If there is no right side, it is Not Found.
The ld.so at the bottom is the linker.
Execute command → ld.so goes to load → environment variables (LD_LIB, etc.) → cache file (ld.so.cache) → ld.so.conf
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
It's like the PATH environment variable version for libraries. Think of it as pointing to the location of the library. If the library can't be found, you need to expand it to point to its location.
## 10th lpic preparation lesson
### What is the package?
Package → Software that bundles configuration files, executable programs, libraries, etc. into one for easy use
→ Software that includes everything you need!
Normally installing software is a pain because you have to compile, build, link to libraries, etc. → With packages, you can install them easily.
### What are package dependencies?
Libraries required to run the software.
For example, in order to use postgreSQL, you need a library called postgresql-libs.
### What is a package manager?
It keeps track of what packages were installed and when.
-
name
-
version
-
size
-
hostname
-
Installation date and time
···Such.
It also remembers in which directory documents, libraries, manuals, etc. are saved, which is also useful.
### Specific (YUM and APT)
There is something like this.
-
Package manipulation commands
Yellowing Updater Modified and Advanced Packaging Tool
rpm and dpkg → Different ones are used depending on the type of Linux. Since you have to use them differently, it's a bit of a hassle...
Debian → apt dpkg → deb file extension
redhat (centos, etc.) → yum rpm → rpm extension format
-
Package Information Database
-
Repository Database
### rpm command. Let's try using it.
There are also various commands.
–> Finished Dependency Resolution
Dependencies Resolved
=====================================================
Package Arch Version Repository
Size
=====================================================
Installing:
zsh x86_64 5.0.2-28.el7 base 2.4M
Transaction Summary
=====================================================
Install 1 Package
It automatically checks for dependencies, resolves them, and automatically downloads them if they exist.
The above is just a simple installation as there were no dependent files.
There are also various commands.
yum update will automatically update all installed programs to the latest version.
/etc/yum.conf is the configuration file.
Additionally, there are configuration files that define access to the yum.repos.d repositories.
root@schoo-centos yum.repos.d]# ls
CentOS-Base.repo CentOS-Media.repo
CentOS-CR.repo CentOS-Sources.repo
CentOS-Debuginfo.repo CentOS-Vault.repo
CentOS-fasttrack.repo
Yum is more convenient overall.
It will also automatically bring in dependent files.
Download only is also possible.
You can also set up a configuration file, which defines access to the repository.
There are also subcommands such as search, update, and download.
It's easy to understand because the commands are explained and demonstrated one by one.
## 12th
### What is the process?
About the process. How to stop it, how to run it, etc.
Child process, parent process.
### What is scheduling?
Computers, which are essentially single-tasking, are made to appear multitasking by switching between each task quickly (suddenly so quickly that it is imperceptible to humans).
The nice value is a value between -20 and 19 assigned to each process. It represents the priority. It can be changed using the commands nice and renice.
A job consists of multiple processes.
ls → 1 process
ls | less → 2 processes. 1 job.
The difference between foreground and background.
When you sell and execute a normal command, it processes in the foreground.
Suspending with ctrl+z will move the job to the background.
So I'm doing a lot of things.


comment