Commands Flashcards
passwd
changes the current user password
echo
prints the text/string given to it to the screen, standard out, by default
-n
no new line
ls -d /*/
file structure and hierarchy that Linux implements to organize everything
pwd
“Print Working Directory” - This command tells you the path of the directory file you are navigating.
ls
“List Segments” - This command tells you what files are in the directory you are navigating. You can use the -a option to show hidden files. Hidden files in Linux start with a .
.
The . character represents the directory you are currently navigating.
..
This represents the directory that is directly above you.
cd
“Change directory” - This command takes an argument of a directory and puts you into that directory.
touch
creates a file in your working directory
mkdir
creates a directory in your working directory
mv
“Move” command takes two arguments:
The Source: The file you want to move.
The Destination: The location where you want to move the file.
use mv to rename files. Use the -r or “recursive” option to move an entire directory.
cp
“Copy” command also takes two arguments:
The source file to copy.
The destination location for the copy.
rm
delete files; if you would like to delete a directory and everything it contains, you can provide the -r or “recursive” option. This can be very dangerous, especially if you provide the -f or “force” option. You may end up accidentally deleting important files if you are not careful.
rmdir
“Remove Directory” is how to delete directories. This directory needs to be empty.