[go: up one dir, main page]

0% found this document useful (0 votes)
30 views6 pages

?kali Linux Basics - Cheat Sheet For Beginners

The document is a cheat sheet for beginners on Kali Linux, covering essential commands across various topics such as navigation, file operations, package management, permissions, system monitoring, networking, file compression, process management, scheduling, and remote access. Each section provides commands, descriptions, and examples for practical use. It serves as a quick reference guide for users to familiarize themselves with basic Kali Linux functionalities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views6 pages

?kali Linux Basics - Cheat Sheet For Beginners

The document is a cheat sheet for beginners on Kali Linux, covering essential commands across various topics such as navigation, file operations, package management, permissions, system monitoring, networking, file compression, process management, scheduling, and remote access. Each section provides commands, descriptions, and examples for practical use. It serves as a quick reference guide for users to familiarize themselves with basic Kali Linux functionalities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Login Subscribe

Hexzilla Posts 💻Kali Linux Basics: Cheat Sheet for Beginners

💻Kali Linux Basics: Cheat Sheet for


Beginners
November 05, 2024

Table of Contents

🧭 Navigation & Directory Management


📝 File Operations
🔍 Search for Files and Text
📦 Package Management with APT
🔒 Permissions and Ownership
📊 System Monitoring
🌐 Network Essentials
💾 File Compression and Archiving
🔧 Process Management
⏰ Scheduling with Cron
🔑 SSH & Remote Access

🧭 Navigation & Directory Management


Command Description Example

pwd Print current directory pwd

ls List directory contents ls

ls -l List contents with details ls -l

ls -a Include hidden files in listing ls -a

cd [directory] Change directory cd Documents


cd .. Move up one directory cd ..

cd ~ Go to the home directory cd ~

mkdir [folder_name] Create a new directory mkdir new_folder

rm [file] Delete a file rm file.txt

rm -r [directory] Remove a directory and rm -r old_folder


contents

cp [source] [dest] Copy files or directories cp file1.txt file2.txt

mv [source] [dest] Move or rename files or mv file.txt newname.txt


directories

📝 File Operations
Command Description Example

cat [file] Display file contents cat notes.txt

less [file] View contents with scroll less notes.txt


option

head -n [num] [file] Show the first n lines of a head -n 5 notes.txt


file

tail -n [num] [file] Show the last n lines of a tail -n 5 notes.txt


file

nano [file] Open file in nano editor nano notes.txt

vim [file] Open file in vim editor vim notes.txt

🔍 Search for Files and Text


Command Description Example

find [path] -name Find files by name in a path find / -name file.txt
[filename]

locate [filename] Quickly locate files (uses locate file.txt


index)
grep '[text]' [file] Search text within a file grep 'error' log.txt

grep -r '[text]' [dir] Recursively search text in a grep -r 'error'


directory /var/logs

📦 Package Management with APT


Command Description Example

sudo apt update Refresh list of available sudo apt update


packages

sudo apt upgrade Install updates for all sudo apt upgrade
installed packages

sudo apt install Install a specific package sudo apt install vim
[package]

sudo apt remove Uninstall a specific package sudo apt remove vim
[package]

dpkg -i [file.deb] Manually install a .deb dpkg -i mypackage.deb


package

🔒 Permissions and Ownership


Command Description Example

chmod [mode] [file] Change permissions (rwx) chmod 755 script.sh


for a file

chown [user]:[group] Change ownership of a file chown root:staff


[file] or directory file.txt

chown -R [user]:[group] Change ownership for chown -R user:user


[dir] directory and contents /project

Example of Permissions with chmod

Each number in chmod represents permissions for Owner, Group, and Others:
Number Permissions Meaning

7 rwx Read, Write, Execute

5 r-x Read, Execute

6 rw- Read, Write

4 r-- Read only

Examples

chmod 755 file.sh → Owner has full access (7 = rwx); group and others can
read and execute (5 = r-x).

chmod 644 file.sh → Owner can read and write (6 = rw-); group and others
can only read (4 = r--).

📊 System Monitoring
Command Description Example

top Monitor running processes top


in real-time

htop Colorized view of running htop


processes

df -h Show disk usage in human- df -h


readable format

du -sh [directory] Show size of a directory du -sh /home

free -h Show memory usage free -h

uname -a Display system information uname -a

ps aux Show all running processes ps aux

🌐 Network Essentials
Command Description Example
ifconfig Show network interface ifconfig
configuration

ip a List IP addresses of ip a
interfaces

ping [host] Check connectivity to a host ping google.com

netstat -tuln List open ports netstat -tuln

curl [URL] Fetch data from a URL curl http://example.com

wget [URL] Download files from a URL wget


http://example.com/file
.zip

💾 File Compression and Archiving


Command Description Example

tar -cvf archive.tar Create a .tar archive of a tar -cvf backup.tar


[dir] directory /data

tar -xvf archive.tar Extract contents of a .tar tar -xvf backup.tar


archive

gzip [file] Compress a file gzip file.txt

gunzip [file.gz] Decompress a .gz file gunzip file.txt.gz

zip [archive.zip] Compress files into a .zip zip archive.zip


[file] archive file.txt

unzip [archive.zip] Extract contents of a .zip file unzip archive.zip

🔧 Process Management
Command Description Example

kill [PID] Terminate a process by its kill 1234


ID
pkill [name] Terminate a process by pkill firefox
name

bg Move a job to the bg


background

fg Bring a background job to fg


the foreground

jobs List background jobs jobs

⏰ Scheduling with Cron


Command Description Example

crontab -e Edit the current user’s cron crontab -e


jobs

Cron syntax * * * * * command (min, */5 * * * * /script.sh


hour, day, month, weekday)

🔑 SSH & Remote Access


Command Description Example

ssh user@host Connect to a remote system ssh user@192.168.1.10

scp [source] user@host: Copy files to a remote scp file.txt


[dest] system user@192.168.1.10:/path

rsync -av [source] Sync files between local and rsync -av /local
[dest] remote systems user@host:/remote

Keep reading

You might also like