In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Scripts are written so that you don't have to start various services manually (also to be lazy)
1. Enter terminal input
Create a script file with the suffix .sh
Touch test.sh
Edit script
Vim test.sh
Test.sh scripting content
two。 Write test.sh scripts
#! / bin/bash### BEGIN INIT INFO# Provides: test# Required-Start: $remote_fs $syslog# Required-Stop: $remote_fs $syslog# Default-Start: 2 3 4 "Default-Stop: 0 1" Short-Description: start test# Description: start test### END INIT INFO# script content cd / home/Desktop/./test.shexit 0
Start with #! / bin/bash and end with the script content exit0
3. Move the test.sh file to / etc/init.d directory
Move Fil
Sudo mv test.sh / etc/init.d/
Add permissions to the file
Chmod + 750test.sh
Set the boot to start automatically
Sudo update-rc.d test.sh defaults
4. Such a boot automation script is completed.
Summary
The above is the ubuntu introduced by the editor to write the shell script to start automatically. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.