devices refers to questions about the Unix/Linux device special files, normally these are under /dev. Do not use this tag for physical devices (for that use e.g. usb or pci).

learn more… | top users | synonyms (1)

9
votes
3answers
6k views

What is stored in /dev/pts files and can we open them?

I am curious to know that what is stored in /dev/pts/ files. Can we open these files? According to my knowledge, /dev/pts files are created for ssh or telnet sessions.
58
votes
18answers
177k views

How do I find out what hard disks are in the system?

I need to know what hard disks are available, including ones that aren't mounted and possibly aren't formatted. I can't find them in dmesg or /var/log/messages (too much to scroll through). I'm hoping ...
13
votes
3answers
4k views

Understanding /dev and its subdirs and files

$ ls -l /dev/stdin /dev/fd/0 lrwx------ 1 tim tim 64 2011-08-07 09:53 /dev/fd/0 -> /dev/pts/2 lrwxrwxrwx 1 root root 15 2011-08-06 08:14 /dev/stdin -> /proc/self/fd/0 $ ls -l /dev/pts/2 ...
9
votes
4answers
4k views

If I connect a physical device, how can I ever know which device file belongs to it?

Say I plug in several USB drives which don't get automatically mounted. How can I find out which device file belongs to which physical device, so I can mount it for example? I'm running Mac OS X but ...
32
votes
3answers
3k views

Why are network interfaces not in /dev like other devices?

I'm mostly curious, but why aren't network interfaces in /dev? Are there any other kinds of devices that aren't represented as a node under /dev?
5
votes
3answers
608 views

How to get my USB key to auto mount

I'm currently working in a command line only environment. When I plug my USB key in, I see a new device file in /dev: ... sdi sdi1 ... If I simply sudo mount /dev/sdi1 /media/tmp, and umount it ...
5
votes
3answers
4k views

RHEL: Creating stable names for network interfaces

We have a RHEL 5.5 box with 8 interfaces. And the eth interface naming is flip flopping. Sometimes eth0 comes up on physical port 7th, and sometimes on another physical port. We want the naming to ...
9
votes
2answers
10k views

What are character special and block special files in a unix system?

How are character special files and block special files different from regular files in a Inix-like system? Why are they called “character special” and “block special” respectively?
10
votes
4answers
4k views

Can I setup a loopback audio device?

If I can send audio to the output devices, then I can record the same audio as a wave. With filesystems, you can just setup a loopback filesystem and write binary data on a file instead of a device. ...
6
votes
1answer
814 views

USB connect/disconnect notification

I use Linux Mint 13 MATE, and I'm trying to set up notifications when I plug/unplug devices. First of all, I found udev-notify package, but unfortunately it almost doesn't work for me: it works for ...
6
votes
1answer
734 views

Find out if a specific device is an USB mass storage

Context I'm automating SD card imaging from an existing dd factory image. The SD card is always connected through an external USB card reader and thus appears in the system as a SCSI block device ...
8
votes
1answer
5k views

Understand output of `udevadm info -a -n /dev/sdb`

I plug an external HDD into my laptop. I try to find out the information by $ udevadm info -a -n /dev/sdb Udevadm info starts with the device specified by the devpath and then walks up the chain of ...
5
votes
1answer
959 views

How to be notified when a USB device was plugged?

My system have to auto-mount for usb devices, how can I be notified when a usb device is plugged? Where can I read more about? I would like to treat that using shell script or C.
3
votes
1answer
764 views

Is there a way to change device names in /dev directory?

I wrote this rule for testing purpose: SUBSYSTEMS=="usb", ATTRS{manufacturer}=="Kingston", ATTRS{serial}=="001CC0EC34A2BB318709004B", ATTRS{idVendor}=="0951", ATTRS{idProduct}=="1642", ...
3
votes
2answers
3k views

Creating eth0 with consistent network device naming

From my understanding, Arch Linux uses Consistent Network Device Naming where the network devices are no longer named eth0, eth1, etc. I use the proprietary MATLAB software which requires a device ...
4
votes
1answer
3k views

Why do my SATA devices show up under /proc/scsi/scsi?

I have 3 SATA devices on my system. They show up under /proc/scsi/scsi, although these are not SCSI devices. Why do my SATA devices show up under the SCSI directory? $ cat /proc/scsi/scsi Attached ...
3
votes
1answer
3k views

How can I uniquely identify which device is on USB `hub 6-0:1.0: port 2`?

How can I uniquely identify which device is on USB hub 6-0:1.0: port 2? I receive messages in my dmesg every now and then and I want the system to tell me which device is connected to that port. ...
23
votes
1answer
2k views

What do the device files in /dev actually do?

(Not a duplicate of Understanding /dev and its subdirs and files) I was browsing around my filesystem and for the first time I took a second to analyze my /dev directory. I was surprised by the ...
10
votes
2answers
8k views

How do mouse events work in linux?

This is mostly out of curiosity, I'm trying to understand how event handling works on a low level, so please don't reference me to a software that'll do it for me. If for example I want to write a ...
14
votes
3answers
2k views

Monitor what is being sent to /dev/null?

Just for fun: Is there a way to monitor/capture/dump whatever is being written to /dev/null? On Debian, or FreeBSD, if it matters, any other OS specific solutions are also welcome.
8
votes
2answers
4k views

How can I tell whether a network interface is physical (device) or virtual (alias)?

I have a small home router running OpenWrt (Kind of embedded Linux for routers). It has five Ethernet ports, one labeled WAN and four labeld LAN 1 to 4. It has the following Network Interfaces defined ...
5
votes
3answers
3k views

Prevent claiming of novelty usb device by usbhid so I can control it with libusb?

I have a USB rocket launcher that I wish to experiment with through libusb. However, libusb cannot claim the interface; presumably because the output of usb-devices lists 'usbhid' as the driver for ...
1
vote
1answer
2k views

What's the difference between 'no caching page mode present' and 'assuming drive cache. write through.'

Post-POST, post-BIOS screen, post-GRUB; when I boot Debian with a SD card or USB stick plugged in, one of the first things to pop up on the screen (so quickly that usually I don't even notice) looks a ...
6
votes
4answers
1k views

Special File that causes I/O error

I want to automatically test if a piece of software reacts as expected if an essential SQLite DB file fails to be read (causing an I/O error). Exactly that happened some days ago at a client. We ...
6
votes
2answers
911 views

What’s the difference between a “raw” and a “cooked” device driver?

Does this concept only apply to terminal drivers (which is what most sites cover) or to any driver in general?
5
votes
2answers
4k views

What causes /dev/disk/by-label to be populated?

I've noticed that Linux distributions typically have a /dev/disk/by-label directory, but this isn't always the case (For example, the CirrOS Linux test image doesn't have one). What's required on a ...
4
votes
2answers
2k views

How does /dev/fd relate to /proc/self/fd/?

$ ls -l /dev/stdin /dev/fd/0 lrwx------ 1 tim tim 64 2011-08-07 09:53 /dev/fd/0 -> /dev/pts/2 lrwxrwxrwx 1 root root 15 2011-08-06 08:14 /dev/stdin -> /proc/self/fd/0 $ ls -l /dev/pts/2 ...
3
votes
3answers
604 views

Disk size management

I am using Fedora 16. My /dev/sda2, mounted on / (root) with something like 50G got filled 100%: [foampile@~ 13:13:39]> df Filesystem 1K-blocks Used Available Use% Mounted on rootfs ...
1
vote
2answers
86 views

What is a device tree and a device tree blob?

What exactly is a device tree, and a device tree blob? Where can I get its source code for a particular linux version? I found such name while running linux on xilinx chips (having ARM 9), for ...
1
vote
2answers
313 views

Meaning of “target” in virsh XML VM definitions.

I recently found that the target=hda tag in virsh was actually not translating into guest OS (guest OS's use /dev/sdX as the disk device names, in general, it seems). virt-install and /dev/hda vs. ...
1
vote
2answers
697 views

virt-install and /dev/hda vs. /dev/sda

It appears that my virt-install xml file (i.e. created when defining a VM) specifies targets "hda", "hdb", and so on as the devices for disks, however, the VM, once created, lists /dev/sda, /dev/sdb, ...
0
votes
0answers
14 views

Cross driver communication through sysfs or /dev/ [duplicate]

I have two drivers I'm developing. One needs information from the other. Is there anything wrong with one driver reading from the sys attribute / or read/write through /dev/drivername of the driver it ...