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
bet110/125
Sana14.05.2024
Hajmi7,3 Mb.
#232858
1   ...   106   107   108   109   110   111   112   113   ...   125
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.
1   ...   106   107   108   109   110   111   112   113   ...   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