Linux Commands Flashcards
cal
Shows system calendar
date
Shows date
df
To see the current amount of free space on your disk drives
free
to display the amount of free memory
exit
to end a terminal session
Ctrl- Alt-F1 through Ctrl-Alt-F6
To access virtual terminals or virtual consoles
Alt and F1-F6
To switch from one virtual console to another
Alt-F7
To return to the graphical desk- top
pwd
Print name of current working directory
cd (argument)
Change directory
ls
List current working directory contents
.
The “.” symbol refers to the working directory
..
the “..” symbol refers to the working directory’s parent directory
cd
Changes the working directory to your home directory
cd -
Changes the working directory to the previous working directory
cd ~user_name
Changes the working directory to the home directory of user_name
ls -a
Shows hidden files
ls (arg) (arg) …
To list the contents of one or more directories
ls -l
By adding “-l” to the command, we changed the output to the long format
command -options arguments
Overall style of a command
ls -lt
many commands allow multiple short options to be strung together. In this example, the ls command is given two options, the “l” option to produce long format output, and the “t” option to sort the result by the file’s modification time
ls -lt –reverse
Long options are preceded with two dashes
ls -a
ls –all
List all files, even those with names that begin with a period, which are normally not listed (i.e., hidden)
ls -A
ls –almost-all
Like the -a option above except it does not list . (current directory) and .. (parent directory)