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

Filter by
Sorted by
Tagged with
1
vote
1answer
1k 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 ...
0
votes
0answers
6 views

eCSPI with different MOSI, MISO and SCK per spi_device

The manufacturer's device tree setup for ecspi1: &ecspi1 { fsl,spi-num-chipselects = <1>; cs-gpios = <&gpio2 30 0>; pinctrl-names = "default"; pinctrl-0 = <&...
1
vote
1answer
40 views

What is the use of the dummy device?

I am checking the code of the dummy device driver. The dummy_xmit() function destroys the packet. I want to ask what is the real use of the dummy device or is it not useful today and is a legacy ...
3
votes
2answers
5k 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. ...
-1
votes
1answer
39 views

make a pseudo device like /dev/random that outputs primes?

/dev/primes is what I want without writing C code just python which I have known and easily written the program. The device file should be similar to /dev/urandom that outputs primes instead of ...
4
votes
1answer
26 views

How to I set the permissions necessary to make the ioctl CDROM_SEND_PACKET command run?

I've run into an error stemming from lacking permissions when using the CDIO library to issue an eject command to my USB CD-ROM drive. I always get an error message like this: INFO: ioctl ...
0
votes
1answer
16 views

Sort block devices by most recently connected?

How can I block devices by the most recent added ones? No option in lsblk seems to have that functionality.
5
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, ...
1
vote
1answer
51 views

How can I check the model of a device connected to a specific COM through a ssh connection

I am trying to access a remote machine through ssh and check the model of a device that it is connected to a specific COM port; I know what port it is. I have tried some commands, but they either don'...
13
votes
2answers
1k views

Why are < or > required to use /dev/tcp

When trying to call /dev/tcp/www.google.com/80, by typing /dev/tcp/www.google.com/80 Bash says no such file or directory. When looking at other people's code online, they use syntax such as 3<&...
0
votes
1answer
27 views

How do I see that a device is mounted with `exec` option using either mount or /proc/mounts?

I've mounted a cdrom device with mount -o exec /dev/sr0 /media/cdrom0, since I couldn't execute files on it, when the drive was initially mounted by the virtual machine. Now, when I run cat /proc/...
0
votes
1answer
554 views

KDE Connect to Sync Android Device with CentOS 7

What are the KDE Connect process and packages that needed to sync android devices with centOS 7. I want to bridge centOS and android but couldn't find any solution online.
3
votes
1answer
1k 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 ...
1
vote
1answer
1k views

How to associate physical usb port with usb device number

I'm using Ubuntu 12.04. I need to send a command to a device that I have connected on a port of my PC. I can send the command by finding out what the Bus and Device number are. For example, lsusb ...
0
votes
1answer
29 views

Partition table & filesystem for a USB flash drive

I've got a USB flash drive I want to use on printers, audio equipment, and other various devices. In my experience, most Linux is very forgiving about what partition table and FS type I use on my ...
0
votes
1answer
1k views

Unable to connect to USB CDC device

I have an 8 channel USB Relay board which I have connected via USB. The manual for the board states that: To use this product with Linux, USB CDC driver needs to be compiled in with the kernel. ...
4
votes
5answers
10k 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 ...
8
votes
2answers
11k views

Map physical USB device path to the Bus/Device number returned by lsusb

I need to get the title of the attached USB device. I can do that with lsusb. udev allows some substitutions when I write rules: say, we can use $kernel to get name of the device, or $devpath to get ...
2
votes
1answer
51 views

FreeBSD: /dev/dsp exists (“ls -al /dev/dsp”), but does not show in “ls -al /dev”

I'm using FreeBSD-12.0-RELEASE-amd64, when I list all the files in /dev, I don't see /dev/dsp (note there's no output after the first command), but when I list the file by explicitly specifying its ...
0
votes
3answers
1k views

how to know which device was open

is there any shell command, can let me know, current open device or device already in operation. For example, I use minicom to open a device /dev/ttyUSB0 or /dev/ttyS0, after I use program open this ...
0
votes
1answer
45 views

Is there a kind of '/dev/null' to fake output file path?

Let says that I have a CLI which transforms a file_a into a file_b like so: transform --input /path/to/file_a --ouptut /path/to/file_b I have developed a program that use this CLI and need to unit ...
14
votes
1answer
746 views

What are nvme namespaces? How do they work?

I've recently begun supporting Linux installed on devices with built-in nvme ssds. I noticed the device files had an extra number, beyond a number identifying the drive number and the partition number....
0
votes
0answers
21 views

How does linux arbitrate access to devices

I would like to know the different methods linux uses to control access to a peripheral device. e.g. for example you have a spi temperature sensor. And multiple threads are trying to get a reading. ...
0
votes
1answer
764 views

What part(s) of the TTY subsystem control the active /dev/ttyN (TTY device driver N)? [closed]

The TTY subsystem contains the TTY driver, line discipline(s) and hardware drivers (keyboard driver, display driver). Let's say I use a virtual terminal/console. So, my current session uses ‍/dev/...
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 ...
1
vote
0answers
279 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 ...
0
votes
1answer
878 views

Udev Rules Not Running

I'm playing with Udev Rules on OpenSuse Leap, and I'm trying to run a simple and small script once a USB device is plugged into my system. However, my script which I added in my keyword "RUN+=" does ...
2
votes
1answer
71 views

Difference between writing file from /dev/zero and truncate

$ timeout 1 cat /dev/zero > file1 $ wc -c file1 270422016 file1 $ du file1 264084 file1 Questions : (1) How do 270422016 null characters come out to be 264084 bytes (i.e 258M). $ truncate -s ...
14
votes
2answers
39k views

PKCS#7 signature not signed with a trusted key

Installed Ubuntu with SIP disabled on MacBook 2017 - 0 issues, booted in seconds. I have been building it out and created a problem while trying to make the WiFi work. At some point (it was very late)...
50
votes
3answers
44k 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
2answers
64 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,...
4
votes
1answer
369 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
108 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 ...
9
votes
2answers
10k 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
22k 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, ...
70
votes
3answers
79k 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
26 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
59k 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
2k 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
216 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 ...
2
votes
2answers
92 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
26 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
185 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
440 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
0answers
2k views

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

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
29 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
8k 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
102 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 ...