- Wget :
We use it to download files from the internet
Syntax: wget << the link we need to download from it
- SSH
To create secure connections between two host
-whoami
Let me knkw who is the users logged in my kali
- su :
We use it to switch between users ,
Syntax : su - userName
If we type just (su - ) it will become root user
That will make kali think I am a root user
- touch
It is the best way to create " files " not folder
Syntax : touch FileName.txt.
to create more than file uou can type FileName{1..10}
To create file from the specific date : touch -d FileName.txt
-nano & leaafpad:
If you really want to edit a file you can use it
Nano fileName.ex and to save ut ctrk+x+y and enter
-cat & head :
If you want ti see what inside the file you can type
Cat yousef.EX
-shred:
If you don't anyone to see what inside the app
-zip : zip TheFileName.zip FileWantYouZipIt.txt
To compress any files
-cp :
Vopy anyfile
Cp soecife the file directory
- xdg-open :
It will help you by opening files in graphics interface
xdg-open FileName , ' URL '
- tldr
Perfect tool will help you from lising in bug amount of man command information
- open
This command let you open file and directory and applications
Syntax:
open FileName , open DirectoryName , open applicationNane
- find
You can find directories and files
Use -type d to find directory, type f type l
Use -or to reach about a OR b
Syntax :
find SearchPath1 SearchPath2 -name fileFolderName
ps :
Represent for process status
id :
Tell you your id
Hostname:
Your host
Uname:
ifconfig , ip :
Stuff about network
netstat :
Your network state
Lsblk :
List harddriver
Lsusb:
Lsof :
List all of open files
Usermod
Visudo :
It will show the file sudoers
-Alias :
It will allow you to create your own commands
Alias TheCommandName=" ls -al "
-ps :
It wikl show you the tasks that run , if you want to finish any task type kill +
taskkId
-aux will show you all your tasks
-df :
It will show the desk spaace usage
---
---
There is two main package mangaer in linux
1-dpkg : d package manager it is low level package manger and have
a lot of flaws ,
-i for install
2-apt: (Advanced package manager tool )it is powerful, it can download anything on
Debian based linux destruction , how it work ??
Apt depend on a repository it is a storage location that have all thr software that
may gonna use , and to see what the repository we use ,
Sudo apt edit-source: to see my repositories // pool/main
apt -h : to get information
apt show PACKAGEnAME : it will give me information about
package
apt list --installed : to see installed packages
Andl to search about any packages we type:
Apt list --installled | grep ^ PACKAGEnAME
apt remove/purge PACKAGEnAME : it will remove the package,
Remove will keep the user data , but purge never
apt upgrade : updates the apps
full-upgrade : it will remove the unnecessary packages
apt update : it will update the repository
apt update && full
3- aptitude:
4- snap : it like a store , it have a lot of packages
**NOTE**:
.deb the file extension for package and linux specified Debian based and for
undebian based maybe it centos opensuse
There is to more package manager , like pip watch network chuc to see details , or
from hack box website
__________________________________________________________________
New Episode
Linux services (demons )
ps -aux | grep servicesName
Systemd control all your processes
Systemd call the demons , units . Untis = demons
Systemctl : to control units
stop servicesName: it will stop the units.
Status servicesName .
restart servicesName .
reload : it reload unti's configuration not all units can be
reloaded .
Reload-or-restart : it will reload or restart the unit.
enable or disable : it will stop from being start when booting.
is-active/enabl.
List-units : ot will list all units , when you use it , it will only
attempted to parse and load into memory , and it only list the active services , so
we add --all
Python -m http.server :
It will open a local host while it have my linux
We will have a linux serverrrrrrrrr , we can transfer file by using netcat
php -S 127.0.0.1:8080
npx http-server -p 8080
Systemctl start apche2
To change the port , from the file /etc/apche2/ports.conf
curl : client URL
curl opetion url TheUrl
__________________________________________________________________
**SHORT CUT WILL CHANGE YOUR LIFE **
ctrl a go to first command
ctrl e go to the end
ctrl shift c/v copy / paste
ctrl u will delete everything before your cursor , and ctrl y
ctrl k will = = after ======
ctrl x e it will open your text editor and you can edit your code on it
cd ../.. if you wanna back one ore more step for backwards
'' it will run the recent command
Ctrl r you can search about anything to typed in your terminal
__________________________________________________________________
PATHS
Log file : tail -f /var/log/auth.log