How to add link to a device permanently
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Using the command: ln -s /dev/ttyUSB0 /dev/gps0
I link the device gps0
to ttyUSB0
. The problem is after rebooting the machine, the created link will disappear and I should create it again. Is there any way to create the link permanently?
The OS is CentOS 7.
centos symlink udev
add a comment |Â
up vote
0
down vote
favorite
Using the command: ln -s /dev/ttyUSB0 /dev/gps0
I link the device gps0
to ttyUSB0
. The problem is after rebooting the machine, the created link will disappear and I should create it again. Is there any way to create the link permanently?
The OS is CentOS 7.
centos symlink udev
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Using the command: ln -s /dev/ttyUSB0 /dev/gps0
I link the device gps0
to ttyUSB0
. The problem is after rebooting the machine, the created link will disappear and I should create it again. Is there any way to create the link permanently?
The OS is CentOS 7.
centos symlink udev
Using the command: ln -s /dev/ttyUSB0 /dev/gps0
I link the device gps0
to ttyUSB0
. The problem is after rebooting the machine, the created link will disappear and I should create it again. Is there any way to create the link permanently?
The OS is CentOS 7.
centos symlink udev
centos symlink udev
asked Oct 1 at 13:33
Soheil Pourbafrani
1032
1032
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
Given the name of your device --- /dev/gps0
--- I assume that you're dealing with some sort of GPS device. If so, your best bet would be to define a custom udev
rule that matches the device and creates a device with the name that you want. Arch Linux's udev wiki might help to get you started; I don't think there will be fundamental differences between that and CentOS.
Thanks, I read about theudev
. Could you pls give me an example?
â Soheil Pourbafrani
Oct 1 at 13:55
1
Unfortunately I don't have a Linux machine in front of me. Did you see the wiki to which I referred you? The bit that talks about83-webcam.rules
is very similar to what you're after. You'll want to useudevadm
to find out properties of your GPS (e.g., vendor, product id), and create a rule that generates the symlink.
â Andy Dalton
Oct 1 at 14:00
add a comment |Â
up vote
0
down vote
Add it /etc/rc.local. Make sure /etc/rc.local is executable.
vim /etc/rc.local
ln -s /dev/ttyUSB0 /dev/gps0
ls -l /etc/rc.local
lrwxrwxrwx. 1 root root 13 Sep 26 05:46 /etc/rc.local -> rc.d/rc.local
I did but after reboot, it didn't create the link. Maybe because the command needssudo
privileges
â Soheil Pourbafrani
Oct 1 at 13:57
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Given the name of your device --- /dev/gps0
--- I assume that you're dealing with some sort of GPS device. If so, your best bet would be to define a custom udev
rule that matches the device and creates a device with the name that you want. Arch Linux's udev wiki might help to get you started; I don't think there will be fundamental differences between that and CentOS.
Thanks, I read about theudev
. Could you pls give me an example?
â Soheil Pourbafrani
Oct 1 at 13:55
1
Unfortunately I don't have a Linux machine in front of me. Did you see the wiki to which I referred you? The bit that talks about83-webcam.rules
is very similar to what you're after. You'll want to useudevadm
to find out properties of your GPS (e.g., vendor, product id), and create a rule that generates the symlink.
â Andy Dalton
Oct 1 at 14:00
add a comment |Â
up vote
1
down vote
Given the name of your device --- /dev/gps0
--- I assume that you're dealing with some sort of GPS device. If so, your best bet would be to define a custom udev
rule that matches the device and creates a device with the name that you want. Arch Linux's udev wiki might help to get you started; I don't think there will be fundamental differences between that and CentOS.
Thanks, I read about theudev
. Could you pls give me an example?
â Soheil Pourbafrani
Oct 1 at 13:55
1
Unfortunately I don't have a Linux machine in front of me. Did you see the wiki to which I referred you? The bit that talks about83-webcam.rules
is very similar to what you're after. You'll want to useudevadm
to find out properties of your GPS (e.g., vendor, product id), and create a rule that generates the symlink.
â Andy Dalton
Oct 1 at 14:00
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Given the name of your device --- /dev/gps0
--- I assume that you're dealing with some sort of GPS device. If so, your best bet would be to define a custom udev
rule that matches the device and creates a device with the name that you want. Arch Linux's udev wiki might help to get you started; I don't think there will be fundamental differences between that and CentOS.
Given the name of your device --- /dev/gps0
--- I assume that you're dealing with some sort of GPS device. If so, your best bet would be to define a custom udev
rule that matches the device and creates a device with the name that you want. Arch Linux's udev wiki might help to get you started; I don't think there will be fundamental differences between that and CentOS.
answered Oct 1 at 13:47
Andy Dalton
4,9791520
4,9791520
Thanks, I read about theudev
. Could you pls give me an example?
â Soheil Pourbafrani
Oct 1 at 13:55
1
Unfortunately I don't have a Linux machine in front of me. Did you see the wiki to which I referred you? The bit that talks about83-webcam.rules
is very similar to what you're after. You'll want to useudevadm
to find out properties of your GPS (e.g., vendor, product id), and create a rule that generates the symlink.
â Andy Dalton
Oct 1 at 14:00
add a comment |Â
Thanks, I read about theudev
. Could you pls give me an example?
â Soheil Pourbafrani
Oct 1 at 13:55
1
Unfortunately I don't have a Linux machine in front of me. Did you see the wiki to which I referred you? The bit that talks about83-webcam.rules
is very similar to what you're after. You'll want to useudevadm
to find out properties of your GPS (e.g., vendor, product id), and create a rule that generates the symlink.
â Andy Dalton
Oct 1 at 14:00
Thanks, I read about the
udev
. Could you pls give me an example?â Soheil Pourbafrani
Oct 1 at 13:55
Thanks, I read about the
udev
. Could you pls give me an example?â Soheil Pourbafrani
Oct 1 at 13:55
1
1
Unfortunately I don't have a Linux machine in front of me. Did you see the wiki to which I referred you? The bit that talks about
83-webcam.rules
is very similar to what you're after. You'll want to use udevadm
to find out properties of your GPS (e.g., vendor, product id), and create a rule that generates the symlink.â Andy Dalton
Oct 1 at 14:00
Unfortunately I don't have a Linux machine in front of me. Did you see the wiki to which I referred you? The bit that talks about
83-webcam.rules
is very similar to what you're after. You'll want to use udevadm
to find out properties of your GPS (e.g., vendor, product id), and create a rule that generates the symlink.â Andy Dalton
Oct 1 at 14:00
add a comment |Â
up vote
0
down vote
Add it /etc/rc.local. Make sure /etc/rc.local is executable.
vim /etc/rc.local
ln -s /dev/ttyUSB0 /dev/gps0
ls -l /etc/rc.local
lrwxrwxrwx. 1 root root 13 Sep 26 05:46 /etc/rc.local -> rc.d/rc.local
I did but after reboot, it didn't create the link. Maybe because the command needssudo
privileges
â Soheil Pourbafrani
Oct 1 at 13:57
add a comment |Â
up vote
0
down vote
Add it /etc/rc.local. Make sure /etc/rc.local is executable.
vim /etc/rc.local
ln -s /dev/ttyUSB0 /dev/gps0
ls -l /etc/rc.local
lrwxrwxrwx. 1 root root 13 Sep 26 05:46 /etc/rc.local -> rc.d/rc.local
I did but after reboot, it didn't create the link. Maybe because the command needssudo
privileges
â Soheil Pourbafrani
Oct 1 at 13:57
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Add it /etc/rc.local. Make sure /etc/rc.local is executable.
vim /etc/rc.local
ln -s /dev/ttyUSB0 /dev/gps0
ls -l /etc/rc.local
lrwxrwxrwx. 1 root root 13 Sep 26 05:46 /etc/rc.local -> rc.d/rc.local
Add it /etc/rc.local. Make sure /etc/rc.local is executable.
vim /etc/rc.local
ln -s /dev/ttyUSB0 /dev/gps0
ls -l /etc/rc.local
lrwxrwxrwx. 1 root root 13 Sep 26 05:46 /etc/rc.local -> rc.d/rc.local
edited Oct 1 at 13:51
answered Oct 1 at 13:43
EBIN GLADSON
3316
3316
I did but after reboot, it didn't create the link. Maybe because the command needssudo
privileges
â Soheil Pourbafrani
Oct 1 at 13:57
add a comment |Â
I did but after reboot, it didn't create the link. Maybe because the command needssudo
privileges
â Soheil Pourbafrani
Oct 1 at 13:57
I did but after reboot, it didn't create the link. Maybe because the command needs
sudo
privilegesâ Soheil Pourbafrani
Oct 1 at 13:57
I did but after reboot, it didn't create the link. Maybe because the command needs
sudo
privilegesâ Soheil Pourbafrani
Oct 1 at 13:57
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f472577%2fhow-to-add-link-to-a-device-permanently%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password