You are on page 1of 2

A summery of the first lesson:

Lesson 1:

- Taking notes
*take notes with alot of child pathes
*always screenshot
*Be orgenized

- Linux
Navigation Commands:
*passwd - change password
*ls = list directory (Can point at any point on the machine) (-la a flag
that lists all + premissions and hidden files)
*pwd - print working directory - check where I am at
*cd - change directory (Can adress at any point on the machine)
*mkdir - make directroy
*rmdir - remove a directory
*rm - remove files
*echo sends data (if not destenation is given the echo will print the data to
the terminal)
*cp - copy a file (source] [destanation])
*mv - move a file ([source] [destanation])
*locate - locate a file (locate [filename] )
*updatedb - updates the directory database (must run this before running
locate)
*man - manual page of any command
*grep - search for the following words ( can be used to check if a file
contains specific info)

**Linux is case sensetive so be aware of your capital letters!


** ./ - your directory right now
** ../- previous folder
** ~ - the root of the system
** | - pipe the output of one command into the next command after the |
** > - use the command on the following file (Overwrite previous information
that was in the file)
** >> - use the command on the following file (Add the information to the
previous information that was in the file)

Privleges and User Commands:


*cat - reads a file to the terminal
*chmod - change premissions for a file (perms go from lvl 0 - 7 and are typed
with 3 number for (user group everyone) for a detailed explanation on Linux
permissions visit the node “Linux perms” (+x execute perms))
*adduser - make a new user
*sudo - give root presmissions to the next command (sudo ..... [the command])
*su - switch user

Network Commands:
*ifconfig - print network information
*iwconfig - wireless networkj information
*ping - ping an ip adress (-c flag lets you say how much times you want to
ping a machine)
*arp -a - send out an arp request to check for machines on the network
*netstat -a - shows all open ports and what is connected to those ports
*route - shows a routing table

Viewing Creating and Editing Commands:


*history - lists the 15 commands you entered ( (history | grep [command])
this command shows you all the times you run a command on the machine (including
syntex))
*touch - create a file
*nano - use the nano text editor
*apt-get install [program name] - install a program on the machine (can be
run without the install)
*apt install - install a file from the system / kali - server
apt purge *program name - (You have to use the * *) removes everything that
has to do with a certain program
*pip install - run an installer for local files
*git clone - clone a github repository (This is a plugin and does not come
preinstalled on most linux distros!)

Webserver Commands:
*service apache2 start - start a webserver
*service ssh start - start an ssh server
*service postgresql start - a service that starts with metasploit
*service apache2 stop - stops the webserver
*systemctl enable [program name] - start the service when the machine turns
on

Importent files/Directorys in Linux:


*/etc/passwd - a file that stores all the users in the system
*/etc/shadow - stores all of the passwords in the system
*/var/log/auth.log - authntication reports

You might also like