0% found this document useful (0 votes)
8 views

Experiment No 1

The document outlines a lab experiment focused on practicing basic Linux terminal commands using Kali Linux, a distribution designed for digital forensics and penetration testing. It includes a list of essential commands, their functions, and a brief overview of the directory structure in Kali Linux. Additionally, it provides a step-by-step procedure for executing various commands and includes viva questions for further understanding of the material.

Uploaded by

lokeshkonatala
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)
8 views

Experiment No 1

The document outlines a lab experiment focused on practicing basic Linux terminal commands using Kali Linux, a distribution designed for digital forensics and penetration testing. It includes a list of essential commands, their functions, and a brief overview of the directory structure in Kali Linux. Additionally, it provides a step-by-step procedure for executing various commands and includes viva questions for further understanding of the material.

Uploaded by

lokeshkonatala
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

Experiment No.

1
Aim: Mention and practice all the basic Linux terminal commands.

Lab Objectives: The objective of this lab is to demonstrate how to use basic Linux
commands in the terminal.

 Students will also learn how to use file manager (Thunar).

Lab Requirements: Kali Linux running as a virtual machine.

Theory: Kali Linux is a Linux distribution designed for digital forensics and penetration
testing. It is maintained and funded by Offensive Security. It was developed by Mati Aharoni
and Devon Kearns of Offensive Security through the rewrite of BackTrack, their previous
information security testing Linux distribution based on Knoppix. The tagline of Kali Linux
and BackTrack is "The quieter you become, the more you are able to hear".

Kali Linux is based on the Debian Testing branch: most packages Kali uses are imported
from the Debian repositories. Kali Linux has approximately 600 penetration-testing programs
(tools), including Armitage, Nmap, Wireshark, metasploit, John the Ripper, sqlmap,
Aircrack-ng, Burp suite, etc.

The following table provides a very brief list of the standard, well-known, and defined top-
level Kali Linux directories and their purposes. Referencing those directories when accessing
them is accomplished by using the sequentially deeper directory names connected by forward
slashes (/) such as /var/log and /var/spool/mail. These are called paths.

Directory Description
/ The root filesystem is the top-level directory of the filesystem. It contains all

(root of the files required to boot the Linux system before other filesystems are

filesystem) mounted. It must include all of the required executables and libraries
required to boot the remaining filesystems. After the system is booted, all
other filesystems are mounted on standard, well-defined mount points as
subdirectories of the root filesystem.
/root This is not the root (/) filesystem. It is the home directory for the root user.
/home Home directory storage for user files. Each user has a subdirectory in /home.
/home/kali This is the default directory in the terminal. It is represented by ~ symbol.
/bin The /bin directory contains user executable files. Ex: ls, cd, mv etc.
/sbin System binary files. These are executables used for system administration.
/etc Contains the local system configuration files for the host computer.
/tmp Temporary directory. Used by the operating system and many programs to
store temporary files.
/usr These are shareable, read-only files, including executable binaries and
libraries, man files, and other types of documentation.
/usr/bin Contains all the Kali Linux applications (apt, nmap, etc).
/usr/share Contains the application support and data files.
/lib Contains shared library files that are required to boot the system.
/var Variable data files are stored here. This can include things like log files,
MySQL, and other database files, web server data files, email inboxes, and
much more.
/boot Contains the static bootloader and kernel executable and configuration files
required to boot a Linux computer.
/dev This directory contains the device files for every hardware device attached to
the system. These are not device drivers, rather they are files that represent
each device on the computer and facilitate access to those devices.
/media A place to mount external removable media devices such as USB thumb
drives that may be connected to the host.
/mnt A temporary mountpoint for regular filesystems (as in not removable media)
that can be used while the administrator is repairing or working on a
filesystem.
/opt Optional files such as vendor supplied application programs should be
located here.

The following is the list of some Kali Linux basic commands:

whoami ifconfig pwd sudo su exit ls dir


cd cd .. nano touch cat mkdir rm
rmdir cp mv history users wc diff
man help tree chmod gedit apt-get update apt-get upgrade
date cal history clear sleep reboot shutdown
Procedure:

Step1: Log into Kali Linux machine and open a Terminal Window

Command1: Type whoami and hit enter, to get the result.

Command2: Type ifconfig and hit enter, to see the IP address of the host system.

Command3: Type pwd and hit enter, to print the (present) working directory.

Command4: Type sudo su and hit enter, and enter the password to switch the present user
i.e. kali to super user i.e. root.
Command5: Type exit and hit enter, to return back from root user to the normal user i.e.
kali.

Command6: Type ls and hit enter, to get the files and folders in that directory.

Command7: Type cd and hit enter, to change directory.

Command8: Type cd .. and hit enter, to go one step back from the current working directory.

Command9: Type nano <filename.txt> and hit enter, it will open the editor.

Enter the text that you want to save in that text file.
Press Ctrl+S to save and Ctrl+X to exit from the editor.

Command10: Type cat <filename.txt> and hit enter to see what is there in that text file.

Command11: Type mkdir <directory name> and hit enter. It will create one
directory/folder.

Command12: Type rm <filename.txt> and hit enter to delete the text file.

Command13: Type rmdir <directory name> and hit enter to delete that directory/folder.

Command14: Type cp <filename.txt> <folder name> and hit enter. It will copy the same
file into that folder. Note: We can copy all types of files using this command.
Command15: Type mv <filename.txt> <folder name> and hit enter. It will move the entire
file to that folder. Note: We can move all types of files using this command.

Command16: Type history and hit enter to get the result. It will show all the commands that
we used in that terminal.

Step2: Close the Terminal Window and Log out from Kali Linux machine.

Viva Questions:

1. Explain about Kali Linux?

2. What is the root filesystem?

3. Who developed the Kali Linux?

4. Approximately how many tools are there in Kali Linux?

5. What is the use of ifconfig command?

6. What is the difference between cp and mv commands?

7. What will history command display?

You might also like