Linux Commands Flashcards
cd
change directory
ls
lists contents of a directory
ls -la
lists all files and folders in a directory
.
present working directory
..
directory above present working directory
ls -l
lists files and folders excluding hidden
-rw-r…
file
drw-r…
directory
mkdir
creates folder or directory
../..
up twice
dark blue
folders and directories
light blue
links
white
file
green
sticky directory
mv
move (mv source destination)
–help
lists how to use any command
rmdir
removes file/directory
cp
copy (cp source destination)
rm
remove
-f
force
rm -rf
remove +recursive + force (removes directory and any files within it)
b*
all directories/files starting with b
be?
all directories/files starting with be and having a letter in the ? place
df
displays info about disks
du
disk usage
du ~/downloads
disk usage of items in downloads directory
vi
text file editor (no instructions, more powerful) (modal editor)
nano
allows you to edit contents of text files (gives instructions)
vim
VI improved
pico
text editor similar to nano
cat
shows file and contents of that file
>
redirector (overrites)
> >
append symbol
find
walks through a file hierarchy to find a file with a particular name (search for a file)
grep
globally searches for a regular expression and displays it to the screen (search for content within a file)
su
substitute user (switches between users)
sudo
super user do (elevates permissions for a single command)
useradd
adds new user
usermod
modifies users
userdel
deletes a user
passwd
password options
groupadd
creates groups
chmod
changes permissions on a file\
r
read (value of 4)
w
write (value of 2)
x
execute (value of 1)
chown
changes file ownership
chgrp
changes group file ownership
ps
summary of current running processes
top
processes with assorted memory or based on user
ip
information about network
ping
tests deliverability from client to destination (indefinite)
traceroute
traces path packets take
dig
information about a domain name