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

Chpt.5-Introduction To Linux

Uploaded by

aditya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Chpt.5-Introduction To Linux

Uploaded by

aditya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Ethical Hacking &

Penetration Testing Course


Chapter#5 – Introduction to Linux
Content

1.Exploring Kali Linux command line

2. Windows command line

3. sudo Overview

4. Navigating the File System

5. Users and Privileges

6. Common Network Commands

7. Viewing, Creating, and Editing Files

8. Starting and Stopping Services

9. Installing and Updating Tools


1.1. Exploring Kali Linux command line
1.To display present working directory
>>pwd

This command will display the current directory you are in.

2. To list the directories and files in the current directory.


>>ls

This command will display the list of files and directories in the current directory.

3. To change the current working directory


>>cd

This command will change the directory you are currently working on.

4. To find a word in a file.


>>grep keyword filename

This command will list all the lines containing the keyword in them.

5. To create a new directory


>>mkdir directory_name

This command will create a new directory in the current folder with the name directory name.
1.2. Exploring Kali Linux command line
6. To remove a directory
>>rmdir directory_name

This command will remove the directory with the name directory_name from the
current directory.

7. To move a file
>>mv source destination

This command is used to move a file from one location to another.

8. To copy a file
>>cp source destination

This command will copy the file from the source to the destination.

9. To create a new file


>>touch filename

This command will create a new file with the name “filename”

10. To display manual of a command


>>man ls

This command will display a manual or a user guide for the command.
1.3. Exploring Kali Linux command line
11. To check the internet connection or to check whether the host is active or not.
>>ping google.com

This command will send some packets to the mentioned host and will give us output about the details of what is the status of the packet. This
command could be used to check the internet connection.

12. To display network interface details.


>>ifconfig

This command is used to display the details of the network interfaces connected to the system.

13. To download a file


>>wget link_to_file

This command will download the file from the link entered in the command.

14. To install a package


>>sudo apt install package_name

This command is used to install the mentioned package in the system.

15. To remove a package


>>sudo apt remove package_name

This command will remove the mentioned package from the system.
1.4. Exploring Kali Linux command line
16. To upgrade packages in the system
>>sudo apt upgrade

This command will upgrade all the packages in the system.

17. To fetch the packages updates


>>sudo apt update

This command will check for updates of all the packages and will add the updates in the list to upgrade.

18. To get the current username


>>whoami

This command is used to print the username of the current user.

19. To change the current user to superuser or root


>>sudo su

This command will ask for a password and will change the current user to root.

20. To print in terminal


>>echo " To print something on terminal“
2.1. Windows command line
1. Changes the Current Working Directory to the Specified Directory
>>cd

2. Clears the Command Line


>>cls

3. Shows Your PC's Details


>>systeminfo

4. Shows All Wi-Fi Passwords

>>for /f "skip=9 tokens=1,2 delims=:" %i in ('netsh wlan show profiles') do @echo %j | findstr -i -v echo | netsh wlan show profiles %j
key=clear

5. Shows Information about PC IP Addresses and Connections


>>ipconfig

6. Lists Items in a Directory


>>dir

7. Deletes a File
>>del file_name

8. Stops the Execution of a Command


>>Ctrl+C
2.2. Windows command line
9.To print in terminal
>>echo " To print something on terminal“

10.Creates a Folder
>>mkdir File_name

11.Deletes a Folder
>>rmdir folder_name # The folder must be empty for this command to work.

12.Moves a File or Folder to a Specified Folder


>>move src destination

13.Closes the Command Line


>>exit

You might also like