“Skrypt startupu Ubuntu” Kod odpowiedzi

Skrypt startupu Ubuntu

add the command to /home/$USER/.bashrc
BlessedDog

Rozpocznij scipt w startupu Ubuntu

Create a systemd unit file with .service extension in /etc/systemd/system, 
for example creating:

sudo nano /etc/systemd/system/my-service.service

, with the following content:


[Unit]
Description=My custom startup script

[Service]
ExecStart=/home/user/startup.sh start

[Install]
WantedBy=multi-user.target


You can now start/stop this service with:

sudo systemctl start my-service / sudo systemctl stop my-service

To enable this service when startup, run:

sudo systemctl enable my-service

To disable this service when startup, run:

sudo systemctl disable my-service
Green Team

Odpowiedzi podobne do “Skrypt startupu Ubuntu”

Pytania podobne do “Skrypt startupu Ubuntu”

Więcej pokrewnych odpowiedzi na “Skrypt startupu Ubuntu” w Shell/Bash

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu