Here, I will write down the basic knowledge and commands of Linux after reviewing it.
The only software that can communicate with hardware such as CPU, memory, keyboard and disk.
It's like a chat interface that connects directly to the kernel.
You can execute commands in the kernel through the shell language.
Roughly speaking, it looks like this.
Human <=> Shell <=> Kernel
Types of shell languages include sh`` tcsh
bash`` zsh
.
In the LINUX environment, STDIN is a device for controlling input and STDOUT is a device for controlling output. By connecting this device to a terminal, you will be able to use the input and output using the keyboard.
Connecting inputs and outputs in this way is called attaching a tty
.
--Directory operation system
#Display directory information(list)
ls [dir]
#Move directory(change dir)
cd [dir]
#Show current directory(print working dir)
pwd
#Creating a directory(make dir)
mkdir [folder name]
--File operation system
#File creation
touch
#Add to file
echo >> [file name]
#File content display(concatenate)
cat test_file
--Task manager system
#View process(process status)
ps
#Start process in background(&)
sleep 60 &
#Bring the process back to the foreground(foreground)
fg
--Help system
#Command help(help)
ps --help
#Show command save destination(whitch)
whitch ps
#View command manual(manual)
man ps
--Search system
#Find files and folders(find)
find / -type d -name test
#Search for characters
grep "aaa" test.txt -n
#Find the folder name and search for the files in it
find / -type d -name test | xargs grep -r aaa
Recommended Posts