Commands Flashcards
Learning commands
Pwd
Print working directory
Ls
Ls -la
Long listing
Long format ,show hiding files
Man
Manual
Shows different flags or arguments to use
Cd
Cd -
Cd ..
Cd ../../
Change Directory Alone cd takes to home directory Cd - goes back one time Cd .. goes up a directory Cd ../../ goes up multi directory
Su
Sudo
Sudo su
Switch user
Super user do (use to execute command with root privileges)
Gives root privileges
Useradd
Passwd
Adds user
Adds password
Echo
Echo “neo” > linux.txt
Echo “neo”»_space; linux.txt
Echos use to display line of text or string
Adds neo to linux.txt
Adds neo to the end of linux.txt
Cp
Mv
Copy
Cut
Cat
Reads files (prints it out to the terminal)
Touch Mkdir Rm Rmdir Rm -r
Creates empty file Make directory Removes files Removes directories Removes files inside and parent directories
Less
Another command to view files
Head -n # [file path]
Tail -n # [file path]
Head shows number of the lines from top
Tail shows number of the line from bottom
Grep
Finds everything you find :)
Nano
Vim
Text editors
Chmod
Changing permission on a file for example making a file executable.