NOTE: The content on this blog is for educational purposes only. The tools and techniques discussed are intended for ethical hacking, penetration testing, and cybersecurity research. Unauthorized use of these tools on systems without permission is illegal and may result in legal consequences.
By using this information, you agree to use it responsibly and comply with all applicable laws. Cyber Cap does not promote, support, or encourage any illegal activities.
If you’re learning hacking, one of the first skills you need to master is navigating the Linux terminal. The terminal is the basic of Linux, and it’s where the real play happens. if you’re running commands, managing files, or automating tasks, the terminal is your tool.
Before we jump into the commands, let’s talk about why the terminal is so important:
- Power and Control: terminal will give you full control over systen. You can do things that are impossible (or way too slow) with a graphical interface.
- Essential for Hacking: Most hacking tools and techniques are based on command-line . If you don’t know the terminal, you’re not going to study anything
- Automation: You can automate repetitive tasks using scripts, saving you tons of time
(you have to download kali-linux by referring YouTube or iff you want comment it I will do a blog)
Getting Started: Basic Commands:
Let’s start with the basics. These are the commands you’ll use every single time you open the terminal.
1. pwd (Print Working Directory)
This command tells you where you in the file system2. ls (List Files)
The ls command list the all files in your current location3. cd (Change Directory)
Use cd to move around the file system. do you want to go to your Documents folder? Just type: cd Documents
4. mkdir (Make Directory)
to create new directoryIntermediate Commands for Power Users
1. cat (View File Contents) for creating file use touch command
Use cat to quickly view the contents inside a file.cat
grep
3. chmod (Change File Permissions) (we will do a single blog for this)
This command lets you change file permissions. chmod
4. sudo (Superuser Do)
Need to run a command as an admin? Usesudo su
6. head & tail (View First/Last Lines of a File)
To view the first 10 lines of a file use this commnad:
To view the last 10 lines:
7. find (Find Files by Name or Type)
if you searching a file use these:
You can also search by file type, size, or modified time.
8. ps (View Running Processes)
See all active processes believe me this is very usefull:
Great for troubleshooting and system monitoring!
9. kill (Terminate a Process)
Got a stuck program? Find its process ID (ps aux) and kill it:
For stubborn processes, use:
10. df & du (Check Disk Usage)
Check free space on drives:
Check space used by a specific folder:
To view the first 10 lines of a file use this commnad:
head -n 10 file.txt
To view the last 10 lines:
tail -n 10 file.txt
7. find (Find Files by Name or Type)
if you searching a file use these:
find /home -name "file.txt"
You can also search by file type, size, or modified time.
8. ps (View Running Processes)
See all active processes believe me this is very usefull:
ps aux
Great for troubleshooting and system monitoring!
9. kill (Terminate a Process)
Got a stuck program? Find its process ID (ps aux) and kill it:
kill 1234
For stubborn processes, use:
kill -9 1234
10. df & du (Check Disk Usage)
Check free space on drives:
df -h
Check space used by a specific folder:
du -sh folder/
11. tar (Compress/Extract Files)
For creating an archive use this command:
To extract an archive:
12. wget & curl (Download Files from the Internet) (Very useful)
Download a file with wget:
Use curl for the same task: (Normally everyone use this)
13. alias (Create Shortcuts for Commands)
decrease your command size :) :
Now, typing ll will run ls -lah.
14. nohup (Run a Command in the Background)
Run something even after logging out:
Useful for long-running scripts!
15. netstat (Check Network Connections)
View all active connections:
Helps diagnose network issues and monitor open ports.
For creating an archive use this command:
tar -cvf archive.tar folder/
To extract an archive:
tar -xvf archive.tar
12. wget & curl (Download Files from the Internet) (Very useful)
Download a file with wget:
wget https://example.com/file.zip
Use curl for the same task: (Normally everyone use this)
curl -O https://example.com/file.zip
13. alias (Create Shortcuts for Commands)
decrease your command size :) :
alias ll='ls -lah'
Now, typing ll will run ls -lah.
14. nohup (Run a Command in the Background)
Run something even after logging out:
nohup command &
Useful for long-running scripts!
15. netstat (Check Network Connections)
View all active connections:
netstat -tulnp
Helps diagnose network issues and monitor open ports.
Post a Comment