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
bet100/115
Sana27.10.2023
Hajmi7.3 Mb.
#1728481
1   ...   96   97   98   99   100   101   102   103   ...   115
Bog'liq
linuxbasicsforhackers

The Device Directory /dev
Linux has a special directory that contains files representing each attached 
device: the appropriately named /dev directory. As your first introduction
navigate to the /dev directory and then perform a long listing on it. You 
should see something like Listing 10-1.
kali >cd /dev
kali >ls -l
total 0
crw------- 1 root root 10, 175 May 16 12:44 agpgart
crw------- 1 root root 10, 235 May 16 12:44 autofs
drwxr-xr-x 1 root root 160 May 16 12:44 block
--snip--
lrwxrwxrwx 1 root root 3 May 16 12:44 cdrom -> sr0
--snip--
drwxr-xr-x 2 root root 60 May 16 12:44 cpu
--snip--
Listing 10-1: A long listing of the /dev directory
The devices are displayed in alphabetical order by default. You may 
recognize some of the devices, such a cdrom and cpu, but others have 
rather cryptic names. Each device on your system is represented by a file 
in the /dev directory, including devices you’ve probably never used or even 
realized existed. On the off chance you do, there is a device file waiting to 
be used for it.
If you scroll down this screen a bit, you should see more listings of 
devices. Of particular interest are the devices sda1, sda2, sda3, sdb, and 
sdb1, which are usually the hard drive and its partitions and a USB flash 
drive and its partitions.
--snip--
brw-rw---- 1 root root 8, 0 May 16 12:44 sda
brw-rw---- 1 root root 8, 1 May 16 12:44 sda1
brw-rw---- 1 root root 8, 2 May 16 12:44 sda2
brw-rw---- 1 root root 8, 5 May 16 12:44 sda5


Filesystem and Storage Device Management
103
brw-rw---- 1 root root 8, 16 May 16 12:44 sdb
brw-rw---- 1 root root 8, 17 May 16 12:44 sdb1
--snip--
Let’s take a closer look at these.

Download 7.3 Mb.

Do'stlaringiz bilan baham:
1   ...   96   97   98   99   100   101   102   103   ...   115




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling