You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run command with the security privileges of the superuser (Super User DO).
pwd
Full path to working directory.
cat
Concatenate to screen.
clear
Clears the screen.
top
Displays active processes. Press q to quit.
htop
Displays active processes. Press q to quit.
tree
open [file]
Opens a file (as if you double clicked it).
reset
Resets the terminal display.
alias
Show all alias.
history
Show history.
whoami
Show currently user used.
which [nameApp]
Linux which command is used to identify the location of a given executable that is executed when you type the executable name (command) in the terminal prompt.
ps -ef | grep [nameProcess]ps -a | grep [nameProcess] Show process by name.
Navigation.
Key/Command
Description
cd [folder]
Change directory e.g. cd Documents.
cd [path]
Change directory e.g. cd /home/user/Documents.
cd
Home directory.
cd ~
Home directory.
cd /
Root of drive.
cd ..
Previous directory.
cd ../../
Move 2 levels up.
ls
Short listing.
ls -l
Long listing.
ls -a
Listing incl. hidden files.
ls -la
Long listing incl. hidden files.
ls -lh
Long listing with Human readable file sizes.
ls -lah
ls -R
Entire content of folder recursively.
ll
la
colorls
colorls -a
colorls -la
File Management.
Key/Command
Description
touch [file]
Create a new file.
rm [file]
Remove a file, e.g. rm data.tmp.
rm -i [file]
Remove with confirmation.
rm -f [file]
Force removal without confirmation.
cp [file] [newFileName]
Copy file to file.
cp [file] [dir]
Copy file to directory.
mv [file] [newFileName]
Move/Rename, e.g. mv file1.ad /tmp.
less [file]
Output file content delivered in screensize chunks.
find . -name
Finding Nested Files.
Directory Management.
Key/Command
Description
mkdir [dir]
Create new directory.
mkdir -p [dir]/[dir]
Create nested directories.
rmdir [dir]
Remove directory (only operates on empty directories).
rm -R [dir]
Remove directory and contents.
rm -r [dir]
Remove a directory and contents.
rm -rf [dir]
Force removal a directory and contents.
du -sch ./*
Current Directory Size
du -ah -d 1
du -h -d 1
curl
Key/Command
Description
-#, --progress-bar
Make curl display a simple progress bar instead of the more informational standard meter.
-b, --cookie <name=data>
Supply cookie with request. If no =, then specifies the cookie file to use (see -c).
-c, --cookie-jar
File to save response cookies to.
-d, --data
Send specified data in POST request. Details provided below.
-f, --fail
Fail silently (don't output HTML error form if returned).
-F, --form <name=content>
Submit form data.
-H, --header
Headers to supply with request.
-i, --include
Include HTTP headers in the output.
-I, --head
Fetch headers only.
-k, --insecure
Allow insecure connections to succeed.
-L, --location
Follow redirects.
-o, --output
Write output to . Can use --create-dirs in conjunction with this to create any directories specified in the -o path.
-O, --remote-name
Write output to file named like the remote file (only writes to current directory).
-s, --silent
Silent (quiet) mode. Use with -S to force it to show errors.
-v, --verbose
Provide more information (useful for debugging).
-w, --write-out
Make curl display information on stdout after a completed transfer. See man page for more details on available variables. Convenient way to force curl to append a newline to output: -w "\n" (can add to ~/.curlrc).
-X, --request
The request method to use.
curl -H "Content-Type: application/json" -X GET http://localhost:8080
curl -H "Content-Type: application/json" -X POST http://localhost:8080