pwd - Gives the current working directory
whoami - Prints the current user
cd(directoryName) - Changes directory.
cd .. - go back to the parent directory
ls - View all contents of a directory.
clear - Clears the terminal log
cp(file) - Copies files from the current directory to another directory
mv(file)location - Moves files from the current directory to a different directory.
mv(file)newName - Rename files
mkdir(directoryName)- Creates new directory(s)
rmdir(directoryName)- Remove empty directory
rm -r(directoryName)- Deletes directory with content
rm(file) - Deletes directories and files
touch(file) - Creates empty files
cat(fileName) - reads the specified file
tac (fileName) - reads the specified file in reverse
locate(file) - finds a file
tree - lists the files in the current
find (file)- Searches for files in a directory
vi (file) - edit file in the terminal
gedit (file) - edits the file in text editor
nano(file) - edit file in nano editor
sudo - Performs tasks with admin permission
df - Gets report on system's disk space
du - Checks how much space a file takes
head - Views the first line of a file.
tail - Views the last line of a file.
chmod - Changes permission of a file
x execute
w write
r read
- natemk
LINUX: Linux CLI commands
Updated: Apr 23, 2022
Comments