Linux dominates the security means highly protected and open source.
User Permissions: Linux does not give the sudo permissions by default. Thats the linux is highly secured.
Open Source: It is open source means that the bugs identify and fix easily.
Reliable: Its running on server over years without any crash thats why its highly reliable.
Tools: Most of the security and offensive tool run on linux.
Users, groups, permissions
Users: The program or person running the system.
Groups: Multiple users using system by shared links.
Permissions: control the system and files means it control who can run, execute, and read the files in linux.
SUID/SGID basics
SUID: files runs with the permission of sudo user.
SGID: program or files run with the permission of groups user.
File ownership
There are the three types of permissions:
Read
Write
Execute
let’s say...........:
Read = r
Write = w
Execute = x
rwx
and according to digits it’s denoted by :
r= 1
w= 2
x= 4
- = file d = directory
3 to 4 commands used for file permissions:
chown, chmod, chgrp,
for example : adding new user and give it to sudo rights:
useradd name
chown name filename
and
giving full permission to the file :
chmod 777 filename.
Basics Commands
Command Name What it does
pwd Print Working Directory Shows you exactly which folder you are currently in.
ls List Lists all files and folders in your current directory.
cd [folder] Change Directory Moves you into a specific folder (e.g., cd Documents).
mkdir [name] Make Directory Creates a new folder.
touch [file] Touch Creates a new empty file (e.g., touch notes.txt).
cp [src] [dest] Copy Copies a file or folder from one place to another.
mv [src] [dest] Move / Rename Moves a file or renames it if the destination is a new name.
rm [file] Remove Deletes a file. Warning: There is no "Recycle Bin" in the terminal.
Command Name What it does
cat [file] Concatenate Displays the entire content of a file in the terminal.
head [file] Head Shows the first 10 lines of a file.
tail [file] Tail Shows the last 10 lines of a file (great for logs).
nano [file] Nano Editor Opens a simple, easy-to-use text editor inside the terminal.
grep "[text]" Global Regular Expression Print Searches for a specific word or pattern inside a file.
Command Name What it does
whoami Who Am I Displays the username of the current user.
sudo SuperUser Do Runs a command with administrative (Root) privileges.
top / htop Task Manager Shows running processes and CPU/RAM usage.
ifconfig / ip a IP Address Shows your network interfaces and IP address.
chmod Change Mode Changes file permissions (e.g., making a script executable).
Top comments (0)