A simple way to add a boot-up script on Linux

Source: Internet
Author: User

My computer is Lenovo B460, now long run Debian system, but the touchpad is really a maddening existence, each boot to manual fn+f6 off, this is too cumbersome, so the Internet received the relevant information:

Terminal enter the following command to turn off the touchpad:

sudo modprobe-r psmouse

Terminal enter the following command to open the touchpad:

sudo modprobe psmouse


So I think of this command as a small script, boot from the start can be

Because to sudo, so to enter the password, if the script automatically enter the password, then the search has been:

echo "Your passwd" |sudo-s your cmd


This means that the last modification is:

#!/bin/bashecho "Password" |sudo-s modprobe-r psmouseexit


Save the file and name the. killtouchpad.sh in the home directory (preceded by a name. To hide the file)

Then give permission:

chmod +x. killtouchpad.sh



Okay, now add this script from the start of the line, the method is as follows to find rc.local This file edit the line my system is the location of the debian,re.local file is in/etc, but does not guarantee that other systems are, as if some system is etc/rc.d/ Rc.local:

sudo gedit/etc/rc.local


Then edit the file before exit to add:

sh/home/youaccount/.killtouchpad.sh


Save reboot

A simple way to add a boot-up script on Linux

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.