diff --git a/en/latest/_sources/core/installation/udev-rules.rst.txt b/en/latest/_sources/core/installation/udev-rules.rst.txt index ad3cced2a9..ec19b44801 100644 --- a/en/latest/_sources/core/installation/udev-rules.rst.txt +++ b/en/latest/_sources/core/installation/udev-rules.rst.txt @@ -27,7 +27,7 @@ This file must be placed at ``/etc/udev/rules.d/99-platformio-udev.rules`` (preferred location) or ``/lib/udev/rules.d/99-platformio-udev.rules`` (required on some broken systems). -Please open system Terminal and type +Please open the system Terminal and type .. code-block:: bash @@ -40,7 +40,7 @@ Or you can manually download and copy the file to a destination folder sudo cp 99-platformio-udev.rules /etc/udev/rules.d/99-platformio-udev.rules -Restart "udev" management tool: +Restart the "udev" management tool: .. code-block:: bash @@ -52,23 +52,32 @@ Restart "udev" management tool: sudo udevadm trigger -Ubuntu/Debian users may need to add own “username” to the “dialout” group if -they are not “root”, doing this issuing +After this file is installed, physically unplug and reconnect your board. + +Alternative using group membership +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Instead of using a udev rules file, Linux users can get write access to the boards +using system `groups `__. + +First, you need to identify which group owns the file corresponding to the serial port communication to the board (the serial port name can be found with :ref:`cmd_device_list` +command). For example, the file permissions for the serial port ``/dev/ttyACM0`` can be queried by: .. code-block:: bash - sudo usermod -a -G dialout $USER - sudo usermod -a -G plugdev $USER + ls -l /dev/ttyACM0 + + # prints something like: + # crw-rw---- 1 root dialout 166, 0 juil. 10 13:43 /dev/ttyACM0 -Similarly, Arch users may need to add their user to the “uucp” group +In that case, the read/write permission (`rw`) is granted to both the “root” user and members of the “dialout” group. Now, it is possible to grant read/write access to all users (``$ sudo chmod a+rw /dev/ttyACM0``), but this would only last as long as the card remains connected (only the udev rules file mentioned above can make such change permanent). + +The alternative permanent solution is to add its own “username” to the “dialout” group, or whichever group name was identified at the preceding step. Typical names are “dialout”, “plugdev” (Debian/Ubuntu, Fedora), or “uucp” (Arch Linux). Adding a user to a group is done by: .. code-block:: bash - sudo usermod -a -G uucp $USER - sudo usermod -a -G lock $USER + sudo usermod -a -G dialout $USERNAME .. note:: - You will need to log out and log back in again (or reboot) for the user - group changes to take effect. - -After this file is installed, physically unplug and reconnect your board. + You will need to log out and log back in again (or reboot) for the user + group changes to take effect. The effectiveness of the change can be checked with the ``$ id`` shell command. diff --git a/en/latest/core/installation/index.html b/en/latest/core/installation/index.html index 59f87e0a25..a35a030bb1 100644 --- a/en/latest/core/installation/index.html +++ b/en/latest/core/installation/index.html @@ -170,7 +170,10 @@
  • Windows
  • -
  • 99-platformio-udev.rules
  • +
  • 99-platformio-udev.rules +
  • Integration with custom applications (extensions, plugins)
  • Boards