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)

0
votes
2answers
54 views

Combination of tee and tty [on hold]

I tried the below command, I read it from a book sudo ls | tee /dev/tty3a This command gives to me Permission denied, even with sudo. Here tty is the teletypewriter, I know this already. But what ...
1
vote
1answer
16 views

Failing to create /dev entry from sysfs, No such device or address

I've got some sort of home entertainment system running an old version of Linux 2.6. It has a SATA > USB bridge system and a couple of USB ports. What I want to do is use it as Network Attached ...
2
votes
2answers
36 views

How to make sure that certain devices always use the same device file?

When mounting a hard drive via UUID and another via device file, how can I make sure, that the first one is always /dev/sdaX and the second /dev/sdbX and not the other way round? Some explanation of ...
2
votes
0answers
24 views

Predictable partition name for squashfs partition in initramfs

TL;DR: How can I boot a squashfs partition from initramfs with a predictable partition name? /dev/sda2 won't work because the device names get reordered randomly and sometimes it will boot from the ...
0
votes
3answers
1k views

Creating a character device file

How to create the character device files? I have tried cat > xxx^c But I can't create a character device file
3
votes
2answers
2k views

Debian USB automount

Got my USB flash automount broken after reboot. Using Debian 6, GNOME 2 My NTFS hard disk is still mounting correctly. When i connect my Android smartphone (with SD and local drive) my messages log ...
3
votes
6answers
5k views

GNU/Linux: how to detect hard disk mappings?

Let's suppose you have two hard-disks: one internal (boots GNU/Linux (Debian)); one external (USB). fdisk -l detects both, but will not tell you which is /dev/sda and which is /dev/sdb. lsusb will ...
3
votes
1answer
22 views

Is there a definite way to relate a driver's source code in Linux kernel to the device itself?

Linux kernel's source code contains the sources of drivers for plenty of devices under /drivers directory. Sometimes by looking at the source code comment, it's possible to get a hint of the device ...
1
vote
0answers
25 views

Multiple entries in /proc/bus/input/devices for same device

I have one USB touchscreen connected to my hardware setup but using cat /proc/bus/input/devices gives me two entries for the same device : I: Bus=0003 Vendor=2965 Product=5023 Version=0110 N: Name="...
1
vote
0answers
13 views

How do I access USB endpoints with recent Linux kernels?

I am modifying some dated code (from year 2011; see here) that accesses a USB endpoint in the path: /sys/class/usb_endpoint/usbdevBUS.DEVICE_epENDPOINT/device where "BUS", "DEVICE", and "...
24
votes
3answers
14k 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 /proc/...
3
votes
1answer
878 views

Can I use a parallel port as a CUPS input device?

I have an old piece of a hardware that does diagnostics on medical equipment. It prints out results over a parallel port. Is there any way to have CUPS accept jobs from a parallel port and redirect ...
2
votes
0answers
39 views

Ethernet to USB adapter is not initialized as ttyUSB or ttyACM device

When I plug a Ethernet-to-USB adapter to my Ubuntu 14.04 on the USB port. I can see the Ubuntu has an extra ethernet device. However, I want to see /dev/ttyACM* type of device. I'm wondering why the ...
0
votes
0answers
36 views

How to convert from virtual address to physical address and back? [migrated]

I'm given a task to write an application that will talk to a device. However this is not a driver since device is still being developed and the application is intended to exercises its first revision. ...
4
votes
2answers
7k views

Mount an ISO virtually using /dev/sr0 device

I'm doing a study about how CD-ROM can be mounted virtually and all I could find out was mounting using loop devices. mount -o loop disk1.iso /mount-point This is fairly easy. I understand that /...
6
votes
4answers
1k views

Why doesn't xsetwacom work from udev?

I made a script to rotate my Wacom Bamboo tablet 180 degrees. It works fine when I execute it as myself (user) or root, but when started from udev (i.e. when plugging the tablet into a usb port) it ...
5
votes
2answers
2k views

How to get device filename from lsusb output or by device path

Related question: USB connect/disconnect notification When the device is plugged/unplugged, I get instant notification, that's great. But to make it (almost) perfect, I also want to get device ...
30
votes
2answers
33k 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 Unix-like system? Why are they called “character special” and “block special” respectively?
4
votes
1answer
70 views

Where does a device file come from?

I'm reading through the Linux Kernel Module programming guide and I am a bit onfused about how device drivers work. I tried following along and making a basic device driver, which shows up in /proc/...
1
vote
0answers
28 views

Why did the interface name of my wireless card change when I added a sound card?

Predictable network interface names are not supposed to change when hardware is added or removed. Isn't that the whole point of the naming scheme??? My wireless interface was named wlp3s0. I ...
1
vote
0answers
215 views

Unable to find Documents on iPad device when mounted

It seems that this is a common problem, but there haven't been any satisfactory solutions posted yet, despite existing for years. Briefly, the problem is that when I mount my iPad in Linux Mint, I ...
1
vote
1answer
26 views

How to work out which drive and directory your system booted from if it is not mounted in /etc/fstab?

My /etc/fstab doesn't include the disk the system booted from, basically because I made some changes and forgot to include this. The initial /boot and / directories are on different drives. I noticed ...
2
votes
2answers
46 views

Mistakenly removed scsi-drive device files

I mistakenly removed my sd* device files via the following command: rm /dev/sd*. Is it possible to recreate the device files via mknod?
3
votes
1answer
358 views

Webcam Device Driver to support H.264

I have a Creative Live Cam Connect HD (id: 041e:4093) and this webcam has an on-board H.264 encoder. Unfortunately v4l2 only inputs the feed as MJPG. $ v4l2-ctl --list-formats ioctl: VIDIOC_ENUM_FMT ...
1
vote
0answers
14 views

Pci device file identifier?

As regards disk devices, Linux systems represent them through a /dev/ file. /dev/sda is a hard drive, and so on. Is there also a file representing a PCI device, for example a graphic card? If not, ...
6
votes
1answer
5k views

How do I setup more then 10 loopback device?

From this answer the solution is to modprobe loop max_loop=64 Which makes me allowed to use 64 loopback devices then mknod -m 660 /dev/loop8 b 7 8 To create the devices. I did this for 8, 9, 10 ...
0
votes
0answers
22 views

Linux device names vs mounting points

I relaced the root hdd in my virutal linux machine, during the process I tried to assign a name to the device, which was rejected as invalid. The accepted device name was: /dev/xvda The device was ...
-3
votes
1answer
42 views

How can I treat my disk like one big file?

I was reading about device files in FreeBSD, but my understanding is not great. To practice, I thought up the following scenario. I suspect that the problem can be solved using device files. Imagine ...
3
votes
1answer
148 views

How to prevent /sda /sdb changes between boots?

I am going to install Gentoo Linux onto an old hardware, which motherboard is having both IDE and SATA hard drives. I have two IDE and one SATA hard drives connected, and plan to do RAID on them. ...
2
votes
1answer
106 views

According to which algorithm does Linux assign the hard drive letters?

I have observed that between repeated boots of the same system, the mapping between the device names /dev/sda, /dev/sdb/... and the physical hard drives stays the same. However I am not sure if it ...
43
votes
2answers
13k views

How to create /dev/null?

I deleted my /dev/null. How can I restore it?
10
votes
5answers
4k 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 ...
1
vote
0answers
11 views

Edit audio output before playback

I want to low level edit the output of ALSA sound system. I should sniff the audio output, change it before playback and then play it. I saw /dev/snd/OUTDEVICE but I think it is write only. Which is ...
3
votes
2answers
524 views

sysfs and devtmpfs

Ulrich Dangel explains very well the difference between devtmpfs and udev. What about sysfs? I understand that the kernel uses sysfs to export device nodes to user space to be used by udev. So ...
8
votes
1answer
171 views

Command to generate /dev/disk/-by-path/ name on a system without udev daemon

On most Linux systems udev usually creates symlinks in /dev/disk/by-uuid/ /dev/disk/by-path/ which point to actual device nodes (/dev/sda, /dev/sdb, etc). I don't have udev on my system, and I ...
28
votes
4answers
97k views

How can I find available network interfaces?

This is in regard to linux, but if anyone knows of a general *nix method that would be good. I booted a system yesterday with an ethernet cable plugged in. "NetworkManager" is not installed, so once ...
8
votes
3answers
14k 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 ...
2
votes
2answers
129 views

No space left on device on CentOS7

My machine which OS is CentOS7 have to backup 50G data into MySQL. But, there is no space left on the device. But there are many spaces on /home. How can I make user that there are enough space for ...
3
votes
1answer
48 views

Ignore unmounted file systems

I've got two devices on my LAN: a Raspbian jessie and an Ubuntu 14.04. The latter has some nfs shared folders, which are available from Raspbian at startup, set up in its /etc/fstab file as: 192.168....
1
vote
0answers
53 views

How can I mount remove /dev/mem to local

This question is relate to this, but more general. Currently I mount remote root by sshfs sshfs -o sshfs_sync,sync_readdir,reconnect,follow_symlinks,direct_io,sync_read root@pi:/ pi /proc is ok, ...
1
vote
1answer
61 views

Programmatically determine the IRQs associated with a network interface

What is the most reliable way to programmatically determine the IRQs associated with a network interface, given the name of the interface (e.g. eth0)? I'm okay with a best-effort approach, but I'd ...
1
vote
1answer
4k views

LVM unknown device: how to recover?

I have a server with two hard drives that I thought I had correctly installed with LVM, until I discovered that the second hard-drive did not actually seem to be used. I investigated the problem and ...
10
votes
1answer
14k views

How to find which serial port is in use?

The Question: I plugged in a device (i.e. GSM modem) through a serial port (a.k.a. RS-232), and I need to see with which file in /dev/ filesystem this device was tied up, to be able to communicate ...
26
votes
5answers
2k views

How does Linux differentiate between real and unexisting (eg: device) files?

This is a rather low-level question, and I understand that it might not be the best place to ask. But, it seemed more appropriate than any other SE site, so here goes. I know that on the Linux ...
1
vote
1answer
29 views

How can I access optical drive status information?

I can obtain the status of a connected display with: cat /sys/class/drm/card0-HDMI-A-1/status Is there something analogous for optical drives? I looked around in /sys/ but couldn't find anything that ...
4
votes
3answers
358 views

Do tmpfs and devtmpfs share the same memory region?

My system disk usage is like this: # df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 50G 39G 12G 77% / devtmpfs 5.8G 0 5.8G 0% /dev ...
0
votes
1answer
21 views

Busy /dev/gpio. I can shared it?

I need shared one device between two C applications. This device is a buzzer. I've try open this with O_NONBLOCK flag, but result is same: device or resource busy. Is there any possibility to use the ...
0
votes
0answers
40 views

How to call a device's power management methods in another way than during suspend to ram?

Let us consider the e1000e driver for an Ethernet card. This driver provide two power management methods .suspend and .resume to respectively turn off and turn on the card. Those methods are naturally ...
1
vote
3answers
87 views

How could Linux use 'sda' device file when it hasn't been installed?

I am installing CentOS Linux distribution on a fresh new machine. Just for learning. I am new to Linux. At the partition step, CentOS tells me that it has detected a sda HD in my machine and I should ...
-1
votes
2answers
83 views

What are exactly mknod command parameters?

What are exactly mknod command parameters? I want to create a jail in chroot. So I need to do: mknod /var/chroot/bind/dev/null c 1 3 mknod /var/chroot/bind/dev/random c 1 8 What are c, 1, 3 and 8?