Posix + git Flashcards
(96 cards)
What is SSH?
Secure shell (SSH) is a protocol to allow you to remotely log in to another computer. SSH is the client which you run in your machine. The way it works is that the machine you’re trying to connect sends you a challenge which your private key solves and sends the result to the host machine which verifies it via your public key
What is SSHD?
sshd is the server, or daemon in UNIX-speak. It runs in the background on the machine you want to connect to
What port is used by SSH
TCP port 22
What does the command uname -a do?
Prints all information about the current operating system
What command is used to check what user is currently using the computer?
whoami
What command is used to create a new key pair?
ssh-keygen -t ed25519
What do each of the brackets represent? (-)(—)(—)(—)
- File type
- Owner
- Group
- Everyone else
What does the scp command do?
It stands for secure copy and allows you to copy files over SSH
scp syntax is: scp source destination. What form can source/destination take?
[USERNAME@]HOSTNAME:PATH
What is the format of chmod command?
chmod bit_field file_name. I.e. chmod 600 config
How to activate agent forwarding for SSH and what does it do?
- Activate with -A flag
- It allows to reuse same private key in your machine to access machines from a machine other than your own (if you already connected to that machine via SSH)
What is vagrant?
A program to manage VMs through another program like virtualbox.
What does the which command do?
It tells you the location of a given command
What is Busybox
It’s a distribution of the common POSIX commands
What kind of files are usually stored in /etc?
System wide configuration files usually only editable by root
What is musl?
A lightweight implementaiton of the C standard library
What kind of files are stored in /lib?
Dynamic libraries like the C library
What does /sbin or /usr usually contan?
System binaries and readonly data like configuration files but not temp data respectively
What does /tmp store?
Temporary files that may live in RAM
What does /var store?
Files that vary over time like caches or logs
What are /dev, /sys, and /proc used for?
- /dev - interface for devices like hard disks
- /sys - system functions (i.e. changing screen brightness)
- /proc - running processes
What’s a package manager and what is its main benefit? (according to david’s notes)
It allows you to install packages from a repository and it has the advantage of installing dependencies automatically.
What command do you use to figure out what dependencies a package depends on? (alpine linux)
apk info -a [name of package]
What are the two commands that should be run regularly by system administrators?
sudo apk update
sudo apk upgrade