The purpose of writing scripts is to avoid having to manually start various services (also for laziness haha) 1. Enter the terminal and enter Create a script file with the suffix .sh Editing Scripts test.sh script content 2. Write the test.sh script #!/bin/bash ### BEGIN INIT INFO # Provides: test # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start test # Description: start test ### END INIT INFO #Write the script content here cd /home/Desktop/ ./test.sh exit 0 Start with #!/bin/bash and write the script content in the middle and end with exit0 3. Move the test.sh file to the /etc/init.d directory Move files Add permissions to the file Set automatic startup 4. Such a startup automation script is completed Summarize The above is what I introduced to you about writing shell scripts in Ubuntu to automatically start the computer at boot. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: MySQL 8.0.16 compressed package installation and configuration method graphic tutorial
>>: Vue batch update dom implementation steps
1 Introduction Good coding habits are qualities t...
Drag the mouse to take a screenshot of the page (...
1. Use floating method Effect picture: The code i...
Use the Linux utility certbot to generate https c...
In daily maintenance, threads are often blocked, ...
Preface Starting from MySQL 5.7.11, MySQL support...
Table of contents Debounce Throttle Summarize Deb...
Source code (some classes deleted): Copy code The ...
Preface In databases such as Oracle and SQL Serve...
Vue2+elementui's hover prompts are divided in...
Table of contents 1minio is simple 2 Docker build...
MySQL supports nested transactions, but not many ...
It is provided in the form of WeChat components. ...
Netease Kanyouxi official website (http://kanyoux...
NAT In this way, the virtual machine's networ...