Basic linux commands

Written by kisa

On May 17, 2020

Here are some useful commands in linux


Command Possible Keys Action
touch create file
pwd print working directory
ls -l (more info) -la (hidden included) list files
mkdir make directory
cd change directory
rm -r  (recursively) remove
rmdir remove directory
cp copy file/directory
mv move (rename)
type/whereis what type of command or where it “lives”
who currently logged in user
man manual
cat concatenate file to terminal (view/print – file)
usermode [KEYS] “editedId” “whatToAdd” -aG (add group) -G (replace all with..)

example: chmod u+rw,g-x+rw,o-rwx filename


change file/dir owner

chgrp change file/dir group




Useful directories:



-> users,deamons info: uid, gid, work directory…



-> shows – group:guid



-> where hashed passwords are stored




Ownership of Linux files


Absolute(Numeric) Mode


Number Permission Type Symbol
0 No Permissions
1 Execute –x
2 Writ -w-
3 Execute+Write -wx
4 Read r–
5 Read + Execute r-x
6 Read + Write rw-
7 Read + Write + Execute rwx


Submit a Comment

Your email address will not be published. Required fields are marked *