Linux Basic commands Flashcards
pwd
print current directory
cd
change directory
ls
list directories
ls -l
long list format for ls
cat
show the content of files
clear
clears the terminal
man “command”
the documentation for a given command
exit
exits you out of a shell
enter
moves down by one line
g
go to top of the pag
G
go to the bottom of the page
Environmental Variables
have a name and value. Access with echo $VAR_NAME
$PATH
an env variable that controls the command search path and contains list of directories. This is where the computer goes to look for commands you enter in the terminal
which + command
tells you where a command lives in your system
–help
used after a command, tells you more information (maybe)
.
this directory
..
parent directory
mkdir -p
Make a directory. -p adds parents, and you can use / to separate, eg:
1/2/3
rmdir -p
deletes directories (only if empty)
rm -rf
recursively removes directories (deletes everything)