LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2012, 12:21 PM   #1
qwerty4061
Member
 
Registered: Nov 2011
Posts: 31

Rep: Reputation: Disabled
Device file information


Hi,
Is there any method by which I can get information regarding device file. What I mean is that, if I wanted to know what is the device file for my ethernet device or my sound card, how do I find it. Is there any command or document for that? Also, if I wanted to know the purpose of any particular device file, say for example
/dev/ram0, how can I find it?

Thanks
 
Old 01-04-2012, 08:18 PM   #2
hydraMax
Member
 
Registered: Jul 2010
Location: Skynet
Distribution: Debian + Emacs
Posts: 467
Blog Entries: 60

Rep: Reputation: 51
This perhaps isn't a full answer to your question, but here is some info:

A few of the device files have manual pages. E.g., enter man ram or man 4 tty.

I'm not sure about quickly knowing the device file for any kind of device. But there are a lot of ways to get information for various devices:

* lspci
* lsusb
* lsblk /dev/md127 (or any other block device file): returns some information.
* various informative files are located in your /sys directory in a fairly logical manner (at least, on newer distros). For example, my system:

Code:
# tree /sys/ -L 2
/sys/
|-- block
|   |-- dm-0 -> ../devices/virtual/block/dm-0
|   |-- dm-1 -> ../devices/virtual/block/dm-1
|   |-- dm-2 -> ../devices/virtual/block/dm-2
|   |-- dm-3 -> ../devices/virtual/block/dm-3
|   |-- dm-4 -> ../devices/virtual/block/dm-4
|   |-- dm-5 -> ../devices/virtual/block/dm-5
|   |-- hda -> ../devices/pci0000:00/0000:00:14.1/ide0/0.0/block/hda
|   |-- loop0 -> ../devices/virtual/block/loop0
|   |-- loop1 -> ../devices/virtual/block/loop1
|   |-- loop2 -> ../devices/virtual/block/loop2
|   |-- loop3 -> ../devices/virtual/block/loop3
|   |-- loop4 -> ../devices/virtual/block/loop4
|   |-- loop5 -> ../devices/virtual/block/loop5
|   |-- loop6 -> ../devices/virtual/block/loop6
|   |-- loop7 -> ../devices/virtual/block/loop7
|   |-- md127 -> ../devices/virtual/block/md127
|   |-- ram0 -> ../devices/virtual/block/ram0
|   |-- ram1 -> ../devices/virtual/block/ram1
|   |-- ram10 -> ../devices/virtual/block/ram10
|   |-- ram11 -> ../devices/virtual/block/ram11
|   |-- ram12 -> ../devices/virtual/block/ram12
|   |-- ram13 -> ../devices/virtual/block/ram13
|   |-- ram14 -> ../devices/virtual/block/ram14
|   |-- ram15 -> ../devices/virtual/block/ram15
|   |-- ram2 -> ../devices/virtual/block/ram2
|   |-- ram3 -> ../devices/virtual/block/ram3
|   |-- ram4 -> ../devices/virtual/block/ram4
|   |-- ram5 -> ../devices/virtual/block/ram5
|   |-- ram6 -> ../devices/virtual/block/ram6
|   |-- ram7 -> ../devices/virtual/block/ram7
|   |-- ram8 -> ../devices/virtual/block/ram8
|   |-- ram9 -> ../devices/virtual/block/ram9
|   |-- sda -> ../devices/pci0000:00/0000:00:11.0/host0/target0:0:0/0:0:0:0/block/sda
|   |-- sdb -> ../devices/pci0000:00/0000:00:11.0/host1/target1:0:0/1:0:0:0/block/sdb
|   `-- sr0 -> ../devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0/host4/target4:0:0/4:0:0:0/block/sr0
|-- bus
|   |-- ac97
|   |-- acpi
|   |-- cciss
|   |-- event_source
|   |-- gameport
|   |-- hid
|   |-- i2c
|   |-- ide
|   |-- mdio_bus
|   |-- pci
|   |-- pci_express
|   |-- pcmcia
|   |-- platform
|   |-- pnp
|   |-- scsi
|   |-- serio
|   |-- ssb
|   `-- usb
|-- class
|   |-- ata_device
|   |-- ata_link
|   |-- ata_port
|   |-- bdi
|   |-- block
|   |-- bsg
|   |-- dma
|   |-- dmi
|   |-- fc_host
|   |-- fc_remote_ports
|   |-- fc_transport
|   |-- fc_vports
|   |-- firmware
|   |-- graphics
|   |-- hidraw
|   |-- hwmon
|   |-- i2c-adapter
|   |-- ide_port
|   |-- input
|   |-- iscsi_connection
|   |-- iscsi_endpoint
|   |-- iscsi_host
|   |-- iscsi_session
|   |-- iscsi_transport
|   |-- leds
|   |-- mdio_bus
|   |-- mem
|   |-- misc
|   |-- net
|   |-- pci_bus
|   |-- pcmcia_socket
|   |-- power_supply
|   |-- sas_device
|   |-- sas_end_device
|   |-- sas_expander
|   |-- sas_host
|   |-- sas_phy
|   |-- sas_port
|   |-- scsi_device
|   |-- scsi_disk
|   |-- scsi_generic
|   |-- scsi_host
|   |-- sound
|   |-- spi_host
|   |-- spi_transport
|   |-- thermal
|   |-- tty
|   |-- vc
|   `-- vtconsole
|-- dev
|   |-- block
|   `-- char
|-- devices
|   |-- breakpoint
|   |-- cpu
|   |-- LNXSYSTM:00
|   |-- pci0000:00
|   |-- platform
|   |-- pnp0
|   |-- software
|   |-- system
|   `-- virtual
|-- firmware
|   |-- acpi
|   `-- memmap
|-- fs
|   |-- cgroup
|   |-- ext4
|   |-- fuse
|   |-- gfs2
|   |-- o2cb
|   `-- ocfs2
|-- kernel
|   |-- config
|   |-- fscaps
|   |-- kexec_crash_loaded
|   |-- kexec_crash_size
|   |-- kexec_loaded
|   |-- mm
|   |-- notes
|   |-- uevent_helper
|   |-- uevent_seqnum
|   `-- vmcoreinfo
|-- module
|   |-- 3w_9xxx
|   |-- 3w_xxxx
|   |-- 8250
|   |-- aacraid
|   |-- ac97_bus
|   |-- acpi
|   |-- advansys
|   |-- ahci
|   |-- aic79xx
|   |-- aic7xxx
|   |-- aic94xx
|   |-- arcmsr
|   |-- async_memcpy
|   |-- async_pq
|   |-- async_raid6_recov
|   |-- async_tx
|   |-- async_xor
|   |-- ata_piix
|   |-- atp870u
|   |-- block
|   |-- brd
|   |-- BusLogic
|   |-- button
|   |-- cciss
|   |-- configfs
|   |-- DAC960
|   |-- dc395x
|   |-- dmx3191d
|   |-- e1000
|   |-- ehci_hcd
|   |-- emu10k1_gp
|   |-- firmware_class
|   |-- fuse
|   |-- gameport
|   |-- gdth
|   |-- hid
|   |-- hid_a4tech
|   |-- hid_apple
|   |-- hid_belkin
|   |-- hid_cherry
|   |-- hid_chicony
|   |-- hid_cypress
|   |-- hid_ezkey
|   |-- hid_gyration
|   |-- hid_logitech
|   |-- hid_microsoft
|   |-- hid_monterey
|   |-- hid_petalynx
|   |-- hid_pl
|   |-- hid_samsung
|   |-- hid_sony
|   |-- hid_sunplus
|   |-- i2c_core
|   |-- i2c_piix4
|   |-- i8042
|   |-- ide_cd_mod
|   |-- ide_gd_mod
|   |-- ide_pci_generic
|   |-- imm
|   |-- initio
|   |-- iptable_filter
|   |-- iptable_mangle
|   |-- iptable_nat
|   |-- ip_tables
|   |-- ipv6
|   |-- it821x
|   |-- jfs
|   |-- joydev
|   |-- kernel
|   |-- keyboard
|   |-- libahci
|   |-- libata
|   |-- libiscsi
|   |-- libphy
|   |-- libsas
|   |-- lockd
|   |-- loop
|   |-- lpfc
|   |-- md_mod
|   |-- megaraid
|   |-- megaraid_mbox
|   |-- megaraid_mm
|   |-- megaraid_sas
|   |-- mii
|   |-- mousedev
|   |-- mptbase
|   |-- mptfc
|   |-- mptsas
|   |-- mptscsih
|   |-- mptspi
|   |-- nf_conntrack
|   |-- nf_conntrack_ipv4
|   |-- nf_defrag_ipv4
|   |-- nf_nat
|   |-- nfs
|   |-- nvidia
|   |-- ocfs2
|   |-- ocfs2_dlm
|   |-- ocfs2_dlmfs
|   |-- ocfs2_nodemanager
|   |-- ohci_hcd
|   |-- parport
|   |-- pata_ali
|   |-- pata_amd
|   |-- pata_artop
|   |-- pata_atiixp
|   |-- pata_cmd64x
|   |-- pata_cs5520
|   |-- pata_cs5530
|   |-- pata_efar
|   |-- pata_hpt366
|   |-- pata_hpt37x
|   |-- pata_hpt3x2n
|   |-- pata_hpt3x3
|   |-- pata_it8213
|   |-- pata_it821x
|   |-- pata_jmicron
|   |-- pata_marvell
|   |-- pata_mpiix
|   |-- pata_netcell
|   |-- pata_ns87410
|   |-- pata_ns87415
|   |-- pata_opti
|   |-- pata_optidma
|   |-- pata_pcmcia
|   |-- pata_pdc2027x
|   |-- pata_pdc202xx_old
|   |-- pata_platform
|   |-- pata_radisys
|   |-- pata_rz1000
|   |-- pata_sc1200
|   |-- pata_serverworks
|   |-- pata_sil680
|   |-- pata_sis
|   |-- pata_sl82c105
|   |-- pata_triflex
|   |-- pata_via
|   |-- pcie_aspm
|   |-- pcmcia
|   |-- pcmcia_core
|   |-- pcspkr
|   |-- pdc_adma
|   |-- pnp
|   |-- printk
|   |-- processor
|   |-- psmouse
|   |-- qla1280
|   |-- qla2xxx
|   |-- r8169
|   |-- raid0
|   |-- raid10
|   |-- raid456
|   |-- raid6_pq
|   |-- rcutree
|   |-- sata_inic162x
|   |-- sata_mv
|   |-- sata_nv
|   |-- sata_promise
|   |-- sata_qstor
|   |-- sata_sil
|   |-- sata_sil24
|   |-- sata_sis
|   |-- sata_svw
|   |-- sata_sx4
|   |-- sata_uli
|   |-- sata_via
|   |-- sata_vsc
|   |-- scsi_mod
|   |-- scsi_tgt
|   |-- scsi_transport_fc
|   |-- scsi_transport_iscsi
|   |-- scsi_transport_sas
|   |-- scsi_transport_spi
|   |-- scsi_wait_scan
|   |-- sg
|   |-- sl811_hcd
|   |-- snd
|   |-- snd_ac97_codec
|   |-- snd_emu10k1
|   |-- snd_emu10k1_synth
|   |-- snd_emux_synth
|   |-- snd_hrtimer
|   |-- snd_hwdep
|   |-- snd_mixer_oss
|   |-- snd_page_alloc
|   |-- snd_pcm
|   |-- snd_pcm_oss
|   |-- snd_rawmidi
|   |-- snd_seq
|   |-- snd_seq_device
|   |-- snd_seq_midi
|   |-- snd_seq_midi_emul
|   |-- snd_seq_midi_event
|   |-- snd_seq_oss
|   |-- snd_seq_virmidi
|   |-- snd_timer
|   |-- snd_util_mem
|   |-- soundcore
|   |-- spurious
|   |-- sr_mod
|   |-- ssb
|   |-- sunrpc
|   |-- sx8
|   |-- sym53c8xx
|   |-- tcp_cubic
|   |-- tg3
|   |-- thermal_sys
|   |-- uhci_hcd
|   |-- usbcore
|   |-- usbhid
|   |-- usb_storage
|   |-- vt
|   |-- xor
|   |-- x_tables
|   |-- xt_state
|   `-- xt_tcpudp
`-- power
    |-- disk
    |-- image_size
    |-- pm_async
    |-- reserved_size
    |-- resume
    |-- state
    `-- wakeup_count
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
store a block device information in sb_info struct of ext4 file system shwety1085 Linux - Newbie 0 09-05-2011 10:09 PM
usb device information in AIX venkat_k AIX 1 04-08-2010 08:20 AM
Command failed: Can't get device information a.belafonte Linux - Newbie 0 10-23-2008 12:42 PM
How to find out indone information and datablocks information in a file system chaitanya1982 Linux - Newbie 1 09-24-2008 02:58 AM
Memory slot and device information. atticboy1 Linux - Hardware 5 11-07-2006 12:31 PM


All times are GMT -5. The time now is 06:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration