Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

ls (Show the files )

cd (get into any directory)


echo (Output any text)
cat (OPen any txt file)
pwd(Show the whole direcotry)
whoami(show the current login user)
mkdir (making a directory)
touch (making file)
mv (move file to one folder to different folder)
cp (copy the files with same content)
RM (REMOVE A FILE)
rm -R (remove a whole directory)
su (To use a shell from different user)

wget (To Downloading a file)


nano (advanced text editor)
scp (used to copy files remotrly on one syste mto another)
python3 -m http.server(a python3 version to access webserver)
python3 -m http.server 8000 (to convert your computer directories as a webserver)
ps aux (Show the list of running procsses that get me through to the command)
systemctl (to interact with process services).
systemctl stop (to stop the services)

nmap -sn <ip with net mask> (for ping sweep)


-sX for XMan Scan
-sT for TCP/SYN Scan

enum4linux -A <ip addr> (for gathering the information ob target's machine).


SHell Operators
& (used to run commands on background)
&& (execute multiple commands on dependency)
> (owerrite the current text with the new one)
>> (append the texts)
grep (SHwo the specfic entry of given text)
find(LOcate the file with name)
Common Directories(The "/var" directory, with "var" being short for variable data,
is one of the main root folders found on a Linux install. This folder stores data
that is frequently accessed or written by services or applications running on the
system. For example, log files from running services and applications are written
here (/var/log), or other data that is not necessarily associated with a specific
user (i.e., databases and the like).

etc(This root directory is one of the most important root directories on your
system. The etc folder (short for etcetera) is a commonplace location to store
system files that are used by your operating system.

For example, the sudoers file highlighted in the screenshot below contains a list
of the users & groups that have permission to run sudo or a set of commands as the
root user.

Also highlighted below are the "passwd" and "shadow" files. These two files are
special for Linux as they show how your system stores the passwords for each user
in encrypted formatting called sha512.)

/root (home for system user basicallya home directory)

/tmp(This is a unique root directory found on a Linux install. Short for


"temporary", the /tmp directory is volatile and is used to store data that is only
needed to be accessed once or twice. Similar to the memory on your computer, once
the computer is restarted, the contents of this folder are cleared out.

What's useful for us in pentesting is that any user can write to this folder by
default. Meaning once we have access to a machine, it serves as a good place to
store things like our enumeration scripts.)

Systemd is a first process that a system initiate with process id 0. AB koi bhi
program mai yahan se chalauga woh child process hoga systemd ka,

You might also like