Linux Command Intro

Cheatsheet perintah-perintah dasar Linux

Catatan ini ditujukan untuk mempermudah pencarian perintah-perintah dasar Linux untuk keperluan Pentesting/VA.Cheatsheet ini disadur dari akun Github rekan saya Satrya Mahardhika.

whoami

Print active User ID

whoami

pwd

Print Working directory

pwd

mkdir

Make Directory

mkdir pentest/

cd

Change directory

cd pentest // Change directory to pentest (Inside Working Directory)
cd /var // change directory to var (Outside Working Directory)
cd //Back to home Directory
cd .. // Directory Up

ls

List files in working Directory

which

Locate executable file full path

man

Manual Page of a Command

locate

Find / Search for files

wget

Download a file

cat

Concatenate / print contents of a files

Cat only first 10 lines of a file

tail

Cat only last 10 lines of a file

cp

Copy file

mv

Rename or cut a file

grep

Search for specific word in a file

wc

Count lines, words, bytes, of a files

sort

Sort files

tab completion

Automatically fill the command/files names we write

history

Check history of command we input

sudo

Super User do!

su

switch user

Piping & Redirection

Piping ( | ) is a command that let you use two or more commands such that output of one command serves as input to the next command.

Redirection is change the output of command to a files

cut

Cutting out some section of a file

awk

More powerful than Cut

Last updated

Was this helpful?