Issue
To upload sketch to an arduino need to execute following command:
sudo chmod a+rw /dev/ttyACM0
.
I think it is because to identify the port and list it in system.But i need to execute it after every time i shutdown or hibernate my PC.But why? and how can i avoid this. I want to write the command only once and not after every shutdown.
Solution
What do you get when you ls -l /dev/ttyACM0
?
Many of these devices are owned by a group specific to the use of that hardware, like dialout
for serial ports. Typically, that specialized group has write permission on that port. If you add your user to that group, you won't have to keep changing permissions.
Your changes to files in /dev
aren't persistent because the directory is generated dynamically each time your system starts up; if you run: mount | grep ' /dev'
you will see that a virtual filesystem like udev
(it depends on your distro) is mounted, not an actual device like /dev/sda1
.
Use something like sudo usermod -a -G dialout $USER
to add yourself to that group, then log out and log in again to activate the change.
Answered By - Jeff Breadner Answer Checked By - Timothy Miller (WPSolving Admin)