Linux standard textbook memo 3

command

The basic task of a computer is to process data. A file is used as a way to store this data on your computer. In addition, a directory (also called a folder) is created as a method of grouping multiple files according to their contents and purposes. The command is for manipulating this file.

The actual state of the command is a program, and the program is also a kind of file, and directories for programs such as / bin and / sbin are located. When you execute a normal command, you do not need to be aware of which directory the program for that command is located in. That's because the program directory is set in an environment variable called PATH. Take a look below.

$ pwd
$ /bin/pwd

$ ls
$ /bin/ls

The result of both executions is the same. It also runs on $ pwd because it is set in your PATH to run $ / bin / pwd when $ pwd is run. This setting is called ** passing through the PATH **.

Environment variable

It is a box to store the data you want to share in the terminal. So PATH is also one of the environment variables.

which command name

You can use which command to display the path of the command located under the directory included in PATH.

Recommended Posts

Linux standard textbook memo 1
Linux standard textbook memo 3
Linux standard textbook memo 1 part 2
Linux standard textbook memo part 6
Linux standard textbook
[Reading memo] Linux standard textbook (Chapter 7-8)
Linux standard textbook part 5
Linux standard textbook part 4
I read "Linux standard textbook"!
Linux x memo
linux (ubuntu) memo
Linux # Command Memo 1
Linux standard textbook chapter end test answer
[For memo] Linux Part 2
NTP configuration memo on Linux
Linux tar xz command memo
New Linux textbook (study notes)
[For AtCoder] Standard input memo
Linux Frequently Used Commands [Personal Memo]
[For memo] Linux Part 1 vi editor
Install tensorflow in Docker (LINUX) (memo)
Linux command [ldconfig] LPIC learning memo
Linux
Linux command (basic in basic) personal memo
Easy JSON formatting with standard Linux functions
React → Ajax → Django on Linux implementation memo
Python standard library: second half (Python learning memo ⑨)
Python standard library: First half (Python learning memo ⑧)