Linux Commands Flashcards
To learn commonly used basic Linux commands.
Command to list directory contents?
ls [options]
Command to create a new directory?
mkdir [options] [directory name]
Command to change to a directory?
cd /[directory path]
Command to copy files and directories?
cp [options] [source] [destination]
Command to display a file’s content to the standard output device (usually your monitor)?
cat [filename]
Command to change a file’s permission?
chmod [options] mode [filename]
Command to change a file’s owner?
chown [options] filename
Command to clear a command line screen/window for a fresh start?
clear
Command to display or set the system date and time?
date [options]
Command to display used and available disk space?
df [options]
Command to determine how much space each file takes up?
du [options]
Command to determine what type of data is within a file?
file [options] [filename]
Command to search for files matching a provided pattern?
find [pathname] [expression]
Command to search files or output for a particular pattern?
grep [options] pattern [filename]
Command to stop a process?
kill [options] pid
Note:
If a process refuses to stop, use “kill -9 pid”