Ethical Hacking and Penetration Testing Guide


Some Unforgettable Basics



Yüklə 22,44 Mb.
Pdf görüntüsü
səhifə37/235
tarix07.08.2023
ölçüsü22,44 Mb.
#138846
1   ...   33   34   35   36   37   38   39   40   ...   235
Ethical Hacking and Penetration Testing Guide ( PDFDrive )

Some Unforgettable Basics
Changing the Password
We would need to issue the following command in order to change the password of our Linux box. 
Generally, it’s a good practice to change the default password to prevent unscrupulous people from 
getting into the network. This is the reason I have kept this command at the top of the basics list.
passwd
Clearing the Screen
In Windows command prompt we use “cls”; inside Linux BackTrack we use the 
clear
command.
Listing the Contents of a Directory
ls
ls is used for listing the contents in a directory, the –l parameter can also be used for listing the 
permissions of the current directory.
Displaying Contents of a Specific Directory
ls/pentest/enumeration
It is used to list the contents of a specific directory. Issuing this command generates a list of the 
contents of the 
/pentest/enumeration
directory.


Linux Basics
◾ 
45
Displaying the Contents of a File
cat password.txt
This command lists the contents of the passwords file.
Creating a Directory
mkdir directoryname
The process is the same as in Windows.
Changing the Directories
cd/pentest/enumeration
Changing the directories is very simple. It works as in Windows. However, we use / in Linux 
instead of \ for changing the directories.
Windows
C:/windows/settings
Linux
/pentest/web/scanners
Creating a Text File
touch hack.txt
This command creates a text file with the name hack.txt.
Copying a File
Cp source target
cp /var/www/filename /pentest/web/filename
This command will copy the file from the 
/var/www
directory to the 
/pentest/web/
directory.
Current Working Directory
pwd
This will return the current working directory.
Renaming a File
mv oldfile.txt newfile.txt


46
◾ 
Ethical Hacking and Penetration Testing Guide
There is no command specifically for renaming files inside Linux; however, you just need to issue 
the mv command to rename the file.
Moving a File
mv hack.txt/pentest/enumeration/
This command will move the file hack.txt to the /pentest/enumeration directory.
Removing a File
rm file name
This is very simple, and it works for directories in the same way.

Yüklə 22,44 Mb.

Dostları ilə paylaş:
1   ...   33   34   35   36   37   38   39   40   ...   235




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin