Command to transfer files over SSH
scp [source] [destination]
Me to Target:
[file name] [user@IP:file path]
Target to Me:
[user@IP:file path] [file name]
Command to connect to an SSH server
ssh [target user]@[target IP]
Command to start a web server from directory you’re in
python3 -m http.server
(-m = run module as script)
How to download a file from a web server
Start a web server with: python3 -m http.server
Then: wget http://[IP:port]/[file]
What does a PID represent
Stands for process ID. The PID number tells you when the process started. Processes are numbered in the order they’re started.
Command to display running processes
ps
Command to display all processes including those run by other users
ps aux
Command for real-time statistics for processes running
top
Command to kill a process
kill [PID]
Command to cleanly kill a process
sigterm [PID]
Command to stop a service
systemctl stop [service]
Command to start a service
systemctl start [service]
How do you suspend/background a process?
Add a ‘&’ at the end of the command
or press ctrl+z while the process is running
How do you bring a process to the foreground/unsuspend it?
fg (for most recent process)
fg [jobID] (for specific job)
Command to enable or disable a service on boot
systemctl enable/disable [service]
Command to automate tasks after boot
crontab -e
What does HTTP stand for?
Hypertext Transfer Protocol
What does HTTPS stand for?
Hypertext Transfer Protocol Secure
What HTTP header tells the browser how much data to expect?
content-header
What are the most common HTTP methods?
GET, POST, PUT, & DELETE
What does http GET method do?
Gets information from a web server
What does http POST method do?
Submits data to a web server
What does http PUT method do?
Updates information on a web server
What does http DELETE method do?
Deletes information on a web server