Linux Fundementals Flashcards
When was linux released ?
1991
To output simple text we use ?
Echo
To check name of machine we use ?
whoami
Command to find a file on linux ?
find -name file_name
find -name *.format_type
What shell operators are there ? And what does each do ?
- & - run cmd in the background, can also use CTRL + Z for scripts.
- && - combine multiple commands
- >
- redirect output
- > >
- redirect output without overwriting
Commands that we use regularly ?
Touch - create file
mkdir - create folder
cp - copy
mv - move
rm - remove
file - determine type
How do we check what permissions files in a directory have ?
ls -l
Switching to another user in linux command ?
su username
su -l username
What are the 4 common directories ? What do they do ?
/etc - stores system files that OS uses, also stores “shadow” and “passwd” which has password storing method in sha512 encryption.
/var - accessed by running apps and services, has /var/log that stores variable data about these apps and services
/root - home directory of the root user
/tmp - like ram, stores data until shudown
How to download files from a website ? via what ?
wget via HTTP
Securely trasnfering files via SSH protocol command ? Syntax for sending and receiving to and from a remote server ?
scp - secure copy
scp file_name remote_user_name@remote_ip:path - to send
scp remote_user@remote_ip:path_to_file
What command opens a running server via python ?
python3 -m http.server - to serve files
Command to get from a server after python server deployment ?
wget http://machine_ip:port/file_name
What are processes, what are they managed by ? How do they identify ?
Processes are programs ran on machine, managed by the kernel. They identify by their PID’s, and incremented in order i.e 60th process’s PID = 60
How do we check the list of processes ?
ps command