Skip to content

Instantly share code, notes, and snippets.

@diffficult
Last active November 13, 2025 00:49
Show Gist options
  • Select an option

  • Save diffficult/e4410dad224f1e879354446e21167a0a to your computer and use it in GitHub Desktop.

Select an option

Save diffficult/e4410dad224f1e879354446e21167a0a to your computer and use it in GitHub Desktop.
Ledger Nano S on Arch

Ledger Nano S on Linux

Requirement:

  • Ledger Nano
  • Ledger HW1
  • Ledger Nano S
  • Ledger Blue
  • Special Edition

You need to create a set of udev rules to allow access to the device on Linux. This can be done easily by running the following command:

wget -q -O - https://www.ledgerwallet.com/support/add_udev_rules.sh | sudo bash

Arch Linux specific

If you still cannot access the Ledger Wallet, your user might not belong to the "plugdev" group - in this case, modify the above /etc/udev/rules.d/20-hw1.rules rule to match your group or add a OWNER="username" parameter to each line, username being your Linux user name.

Or edit /etc/udev/rules.d/20-hw1.rules and add the following

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="2b7c", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="3b7c", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="4b7c", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1807", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1808", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", GROUP="users"

Once you made changes to /etc/udev/rules.d/20-hw1.rules just reload them using admin privileges with udevadm

%>udevadm trigger
%>udevadm control --reload-rules

Articles with possible solutions

Ledger Knowledgebase

Steemit article

@KazW
Copy link

KazW commented Jul 5, 2023

My Ledger Nano S has a product id of 1015 and needed this line: SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="1015", MODE="0660", GROUP="users"

@alexs-sh
Copy link

alexs-sh commented Apr 6, 2024

Could be useful for Nano S Plus:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="5015", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0005", MODE="0660", GROUP="users"

@axelsimon
Copy link

Udev rules script is now grabbed from: https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/add_udev_rules.sh
so: wget -q -O - https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/add_udev_rules.sh | sudo bash to download and run. (from https://support.ledger.com/fr/article/115005165269-zd)

But really, piping wget or curl to bash is horrible practice, even more so when elevating privileges with sudo, so just download the script, and copy the rules manually. Currently the script creates the following rules using cat:

cat <<EOF > /etc/udev/rules.d/20-hw1.rules
# HW.1, Nano
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c|2b7c|3b7c|4b7c", TAG+="uaccess", TAG+="udev-acl"

# Blue, NanoS, Aramis, HW.2, Nano X, NanoSP, Stax, Ledger Test,
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", TAG+="uaccess", TAG+="udev-acl"

# Same, but with hidraw-based library (instead of libusb)
KERNEL=="hidraw*", ATTRS{idVendor}=="2c97", MODE="0666"
EOF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment