L in u X ba sics for h acke rs g e t t I n g s t a r t e d w I t h




Download 7,3 Mb.
Pdf ko'rish
bet30/125
Sana14.05.2024
Hajmi7,3 Mb.
#232858
1   ...   26   27   28   29   30   31   32   33   ...   125
Bog'liq
linuxbasicsforhackers

Checking Your Login with whoami
In Linux, the one “all-powerful” superuser or system administrator is named 
root, and it has all the system privileges needed to add users, change pass-
words, change privileges, and so on. Obviously, you don’t want just anyone 
to have the ability to make such changes; you want someone who can be 
trusted and has proper knowledge of the operating system. As a hacker
you usually need to have all those privileges to run the programs and com-
mands you need (many hacker tools won’t work unless you have root privi-
leges), so you’ll want to log in as root.
If you’ve forgotten whether you’re logged in as root or another user, you 
can use the 
whoami
command to see which user you’re logged in as:
kali >
whoami
root
If I had been logged in as another user, such as my personal account, 
whoami
would have returned my username instead, as shown here:
kali >
whoami
OTW
Navigating the Linux Filesystem
Navigating the filesystem from the terminal is an essential Linux skill. To 
get anything done, you need to be able to move around to find applications
files, and directories located in other directories. In a GUI-based system, 
you can visually see the directories, but when you’re using the command 


Getting Started with the Basics
7
line interface, the structure is entirely text based, and navigating the file-
system means using some commands.
Changing Directories with cd
To change directories from the terminal, use the change directory command, 
cd
. For example, here’s how to change to the /etc directory used to store con-
figuration files:
kali >
cd /etc
kali:/etc >
The prompt changes to 
root@kali:/etc
, indicating that we’re in the /etc 
directory. We can confirm this by entering 
pwd
:
kali:/etc >
pwd
/etc
To move up one level in the file structure (toward the root of the file 
structure, or /), we use 
cd
followed by double dots (
..
), as shown here:
kali:/etc >

Download 7,3 Mb.
1   ...   26   27   28   29   30   31   32   33   ...   125




Download 7,3 Mb.
Pdf ko'rish

Bosh sahifa
Aloqalar

    Bosh sahifa



L in u X ba sics for h acke rs g e t t I n g s t a r t e d w I t h

Download 7,3 Mb.
Pdf ko'rish