Ubuntu boot script and use sudo

Source: Internet
Author: User
1. Create a new script file in the/etc/init.d/directory s99_lidar.sh
#! /bin/sh
# command Content
echo ' nvidia ' | Sudo-s route add 224.0.0.1 Dev eth0
Exit 0

2. Increase executable permissions

chmod 755 s99_lidar.sh
3, add the script to the startup script
Execute the following instruction, where 99 indicates a priority, the higher the later the execution
cd/etc/init.d/
sudo update-rc.d s99_lidar.sh defaults 99


4. If you want to remove the boot script above
sudo update-rc.d-f s99_lidar.sh Remove

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.