Linux Commands – learn cli the hard way – Flashcards

Unlock all answers in this set

Unlock answers
question
pwd
answer
print working directory
question
hostname
answer
my computer's hostname
question
mkdir
answer
make directory
question
cd
answer
change directory
question
ls
answer
list directory
question
rmdir
answer
remove directory
question
pushd
answer
push directory
question
popd
answer
pop directory
question
cp
answer
copy a file or directory
question
mv
answer
move a file or directory
question
less
answer
page through a file
question
cat
answer
print the whole file
question
xargs
answer
execute arguments
question
find
answer
find files
question
grep
answer
find things inside files
question
man
answer
read a manual page
question
apropos
answer
find what man page is appropriate
question
env
answer
look at your environment
question
echo
answer
print some arguments
question
export
answer
export/set a new environmental variable
question
exit
answer
exit the shell
question
sudo
answer
DANGER! become super user root DANGER!
question
chmod
answer
change permission modifiers
question
chown
answer
change ownership
question
|
answer
Takes the output from the command on the left and "pipes" it into the command on the right
question
<
answer
Takes the input from the command on the right to the program on the left
question
>
answer
Takes the output of the command on the left and writes it to the file on the right
question
>>
answer
Takes the output of the command on the left and appends it to the file on the right
question
*
answer
matching anything in a wildcard like *.txt
question
find
answer
find STARTDIR -name WILDCARD -print
question
tac
answer
used to look at a file backwards, one line at a time
question
df -h
answer
Displays information about mounted filesystems including usage statistics about currently used and available space
question
mount
answer
used to attach a filesystem. without options and arguments will list all of the currently mounted filesystems along with information that will indicate whether they are mounted as read only or writable.
question
file
answer
tells you the type of a file that a file is (i.e text file, directory, executable etc)
question
diff
answer
compare 2 files
question
diff3
answer
compare 3 files
question
rsync
answer
used to backup files or entire directories with the -r flag. Specify the source and then the target
question
gzip
answer
zip a file or directory with the gzip compression type
question
gunzip
answer
unzip gzip files
question
xz
answer
zip a file or directory with the xz compression type
question
tar xvf mydir.tar
answer
extract all the files in mydir.tar into the mydir directory
question
dd if=/dev/sda of=/dev/sdb
answer
copy entire contents of one disk to another
question
who
answer
list currently logged on users
question
whoami
answer
identify currently logged on user
Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New