Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [devices]

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).

48
votes
3answers
42k 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/...
2
votes
2answers
34 views

lsblk column “RAND” aka “adds randomness” - what does it mean?

Running lsblk (an excellent command for getting info about the disk configuration from within scripts and OS-agnostic high-level languages) on Fedora 29 like so: $ lsblk --output NAME,FSTYPE,ROTA,...
5
votes
1answer
341 views

Why are there two entries per device on /dev/input/by-path

If I go to /dev/input/by-path I can see my input peripherals. I've got one keyboard and one mouse, and on my platform the output is: pci-0000:05:00.0-usb-0:1.2:1.0-event-kbd pci-0000:05:00.0-usb-0:1....
0
votes
0answers
26 views

Who is causing extremely high CPU usage when writing to SSD?

When writing to SSD (regardless if over file system or directly into /dev/sda) I observe extremely high CPU usage, with top showing CPU: 0% usr 53% sys 0% nic 9% idle 27% io 0% irq 9% ...
14
votes
2answers
3k views

Are /dev/{udp,tcp} standardized or available everywhere?

I've recently learned about the /dev/udp and /dev/tcp pseudo-devices here. Are they specific to some GNU/Linux distributions or can I find them on other unix systems? Are they standardized in some ...
1
vote
1answer
1k views

Run Out Of Space On /dev/sda2

My Linux (Mint 13) laptop reported that 'The volume "Fiilesystem root" has only 0 bytes disk space remaining'. When I ran a 'df' I got the following result:- HP-255-G1-Notebook-PC # df Filesystem ...
9
votes
2answers
9k 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 ...
5
votes
3answers
21k views

GSM modem does not create /dev/ttyUSB file

I installed Kannel in a server, and I want to use a GSM 3G USB modem to send/receive SMS messages, as described in section SMS Centers > GSM Modem of the Kannel User Guide. I have already installed, ...
0
votes
0answers
29 views

Multiple /dev/video for one physical device

First some specs: my computer is an HP EliteBook 8460p. It comes with an integrated Chicony HP HD webcam. My issue is that a lot of applications (well, at least Skype and guvcview) are displaying ...
68
votes
3answers
76k views

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

According to my knowledge, /dev/pts files are created for ssh or telnet sessions.
1
vote
0answers
25 views

Ethernet malfunction when booting with extra device on /dev

I have a customized Linux distro (created via buildroot) running on an embedded platform. The system consists in a processing module (Based on Samsung Exynos 4412 microprocessor) with a base board for ...
17
votes
3answers
55k views

How to Reset/Cycle Power to a PCIe Device?

I have a PCIe device that only works correctly when the computer is fully powered off then on again. Issuing a simple reboot or reboot -p command does not appear to cycle the power to the PCIe card, ...
3
votes
3answers
1k views

How to inspect the contents of /dev/sdt

I have what I hope is not a huge problem, but it could end up being a very large problem. For some context, I mistakenly ran this command on my 27" iMac: sudo dd if=ubuntu-rescue.img of=/dev/sdt bs=...
0
votes
2answers
117 views

Linux block devices naming

I am a bit confused with how linux hard drive/ storage device, block files are named. My questions are: How are IDE devices and partitions named? How are EIDE devices and partitions named? How are ...
1
vote
2answers
61 views

The concept of “Airplane Mode” in Linux

When installing a Ubuntu, Manjaro or other Graphical Linux distro on laptop, when press the airplane mode button on laptop, Airplane mode can be enabled. How the concept of airplane mode works in ...
0
votes
1answer
18 views

How to choose between sound outputs without unplugging hardware?

I am currently running the following: 4.15.0-46-generic GNU/Linux Distributor ID: LinuxMint Release: 19.1 Codename: tessa I have my headphones plugged into their dedicated port, however, I ...
6
votes
4answers
8k views

How to know if /dev/hda2 is Primary partition or Extended partition

If all four primary partitions exist on an IDE drive, they are numbered as follows: /dev/hda1 /dev/hda2 /dev/hda3 /dev/hda4 We have also the partitions on a disk with one primary partition and the ...
7
votes
1answer
170 views

Using CapsLock as left mouse button; mostly works but fails with a few things

Linux System Info: OS: GNU/Linux x86_64 Kernel: 3.13.0-24-generic Distro: Linux Mint 17 Qiana, Cinnamon 64-bit 2.2.16 [Based On: Ubuntu 14.04.5 LTS, Trusty Tahr] Due to a ...
2
votes
2answers
153 views

A start job is running for eth0

I am using a new installation of Arch Linux and whenever I boot my system I have to wait for 90 seconds as there is a start job running for my network interfaces. I installed Arch yesterday and ...
3
votes
1answer
1k views

Ubuntu boot fails on Lenovo P52 Thinkpad when hybrid display is set in BIOS

Booting to Ubuntu 12.04.5 LTS fails when the display is set to 'hybrid' in the BIOS (using Nvidia driver 415) When I switch to 'discrete', then it boots to Ubuntu OK. Because I am dual booting with ...
0
votes
0answers
16 views

How to configure multiple SPI devices on Linux

I have an embedded Linux system (F&S PicoComA5) that has shipped with a pre-configured Linux Kernel + buildroot system. By default, only one SPI device is pre-configured, appearing in the system ...
3
votes
1answer
7k views

cat: write error: Invalid argument

Writing to a custom character device using cat 123 > /dev/chardev gives cat: write error: Invalid argument I have changed the permissions to 666 and even tried it with sudo. Still the same ...
-1
votes
1answer
98 views

Why every device in Linux is a file or folder ? what are the advantages? [closed]

Why every device in Linux is a file or folder ? what are the advantages ? and what is the necessity of /dev/sda1 , /dev/sda2 or /dev/sda3 file ? it's size is 0 bytes .and after mounting the hard disk ...
4
votes
2answers
1k views

How to get the actual keyboard device given the output of /proc/bus/input/devices?

When I run: cat /proc/bus/input/devices ...I receive the following output: ... I: Bus=0003 Vendor=040b Product=2000 Version=0110 N: Name="Generic USB Keyboard" P: Phys=usb-0000:00:1d.0-1/input0 S: ...
0
votes
2answers
92 views

cloning a linux image using dd

If I wish to clone my Linux image using the dd utility, I can do for example dd if=/dev/SDX of=/dev/SDY, where SDX is the internal memory device where the Linux image is stored, and SDY is the ...
0
votes
0answers
20 views

1 NFC Device found but won't list it

I am running a VM of Kali Linux. I have an ACR122U NFC Card Reader. One problem I have been having is that when I attach the NFC reader to my PC and run nfc-scan-device -v, it returns "1 NFC device ...
3
votes
1answer
401 views

EDID is not loading from /lib/firmware

I wanted to load customized edid so I have added it's name as "drm_kms_helper.edid_firmware=edid/edid.bin" and I kept the edid under /lib/firmware/edid/. But after booting the system, I cross ...
0
votes
1answer
85 views

DRBD comes up after reboot with Connected Diskless/Diskless

After an unattented power loss, facing a major issue, every reboot the DBRB comes up with Connected Diskless/Diskless status. main problems: dump-md response: Found meta data is "unclean" ...
0
votes
1answer
1k views

hostapd: Failed to set channel (freq=2417): -16 (Device or resource busy)

I'm trying to set up a WiFi Access Point on my Raspberry Pi. I set up the network interface to a static IP and installed hostapd. I'm using this config: # Interface and Driver interface=wlan0 #...
1
vote
1answer
990 views

Disable Ethernet Hardware Devices at start-up

To startup vm called "sys-net" in Qubes on my laptop need to write "1" in file echo -n "1" > /sys/bus/pci/devices/0000\:04\:00.0/remove also 0000:04:00.0 and 0000:04:00.1 are conflicts and need ...
23
votes
1answer
3k views

Why don't reads from /dev/zero count as IO_RBYTES?

I am emptying out a hard drive on some Linux 4.x OS using this command: sudo sh -c 'pv -pterb /dev/zero > /dev/sda' And I opened another tty and started sudo htop and noticed this: PID USER ...
0
votes
1answer
76 views

Creating Persistant Symbolic Link -Linux

I have a cloud server, where a block device (/dev/xvdb1 with filesystem ext3) is attached . I want to create a persistent symlink (/dev/test_link) which should always target to (/dev/xvdb1) using ...
0
votes
0answers
29 views

Device Major number changed in /proc/devices after restart

I installed my device driver using mknod and operating system assigned a major number for it. (Saw 236 in /proc/devices) But when i restart the machine and check the /proc/devices again i saw that ...
0
votes
0answers
8 views

Disconnected onewire devices still exist after echo 1 > w1_master_search

I'm working on embedded device where user connects and disconnects onewire sensors sometimes. Sensors are connected to DS2482 device, which is I2C to 1Wire converter. DS2482 is supported by Linux ...
2
votes
1answer
107 views

Get video device on embedded Linux SoC

I'm trying to find the camera module device of an IP camera (running Linux), without much success. My main objective is to find the camera stream, so I can attach an RTSP server. Update 26/02/2019 ...
0
votes
1answer
31 views

What is a meta device?

man pvcreate says pvcreate initializes a PV so that it is recognized as belonging to LVM, and allows the PV to be used in a VG. A PV can be a disk partition, whole disk,meta device, or loopback ...
0
votes
1answer
80 views

Possible to force udev to create specific device event number, or change device event numbers

I have a kernel module that reads usb keyboard input specifically from /dev/input/event2 and /dev/input/event3. On some devices the keyboard doesn't get assigned event2 and event3, it gets assigned /...
0
votes
0answers
103 views

flush tty device buffer from terminal

I have a serial device on /dev/ttyAMA0. I have program written in C that communicates with this device. But apart from the C program I sometimes need to input some configuration data from terminal, ...
2
votes
1answer
32 views

Why can't I open these device nodes?

[root@archlinux xtricman]# ls -l /dev/pts total 0 crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0 c--------- 1 root root 5, 2 Feb 24 19:10 ptmx [root@archlinux xtricman]# ls -l /mnt total 12 ...
7
votes
3answers
6k views

Can I share a device from under /dev across hosts?

Here's the situation. I have a video device /dev/video0 on a VMware Server and I want to access this device from within a virtual machine. However for whatever reason I can't connect the device ...
4
votes
1answer
1k views

Remote Mouse netcat (/dev/input/mice)

I was playing around with nc and I'm discovering how powerful and versatile this tool is. I was wondering how the file /dev/input/mice works because when I do cat /dev/input/mice you see the output, ...
2
votes
0answers
107 views

How exactly do the Linux display device files work? [closed]

I don't really understand how the Linux display device files work and interact together. What files in the /dev tree need to go where and where do they need to connect/point to, in order to show a ...
8
votes
1answer
493 views

Why was /dev/null called that?

I'm looking for some historic info about the null device. Why was it called /dev/null instead of (for example) /dev/empty? FreeBSD's manual page states that "A null device appeared in Version 7 AT&...
0
votes
2answers
47 views

What is the default behaviour when we mount filesystem with `nodev` option?

I read this in "RH413 Red Hat Server Hardening" course that we mount the filesystems with nodev which then does not allow the special files/devices to be mounted from it. However, it did not show an ...
2
votes
1answer
64 views

Why does terminal takes input line by line?

If I use: strace echo 'a b c' > file The bottom lines are: write(1, "a\nb\nc\nd\n", 8) = 8 but in strace echo 'a b c d' > /dev/pts/0 These lines are: write(1, "a\n", 2) ...
13
votes
3answers
4k views

How do I let an SDL app (not running as root) use the console

I want to use an SDL-based program to display graphics on the console, without having to log on from the console, and without running the program as root. For example, I want to be able to run it via ...
0
votes
0answers
18 views

What is the difference between a Device File and a Device Node?

I was reading an article that mentioned device nodes, and didn't define what they were. Wikipedia also mentioned device node in the device file article but didn't specify what the difference is. Are ...
0
votes
0answers
41 views

How does linux uses device files stored in /dev? [duplicate]

I really got confused how kernel/device drivers use device files? What does happen when we read some file from a device using cat file1.txt? Do device driver copy the content to these files? If yes ...
1
vote
2answers
315 views

chown /dev by mistake

This is a RedHat system running a postgres database. Nothing seems to have broken. Do I need to request a restore? That would destroy a day's worth of work, so I'm not eager to do that. A couple ...
2
votes
2answers
3k views

Must /dev/random and /dev/urandom be created each boot, or are they static files that can be put in a tar?

Must /dev/random and /dev/urandom be created each boot, or are they static files that can be put in a tar? I am trying to understand if I need to recreate these each time the operating system starts, ...