How to make a certain application start at system startup? I know how to start the application when a user logs in (via .bashrc). But how to make it start for all users, and when you turn on the PC?

    1 answer 1

    The question is quite voluminous, so I will only describe in general terms.

    1. Create a script to start | stop the application in the /etc/init.d/ folder (you can use /etc/init.d/skeleton as a basis)
    2. Making it executable

    sudo chmod +x /etc/init.d/local

    1. sudo update-rc.d <имя_скрипта> start 40 2 3 4 5 . stop 30 0 1 6 sudo update-rc.d <имя_скрипта> start 40 2 3 4 5 . stop 30 0 1 6 (the order of start and stop is set here. In this case, the script will execute last when loaded and stop first when it is turned off)

    2. To remove the script from startup, you need to run

    sudo update-rc.d -f <имя_скрипта> remove

    PS To understand the above, you need to read the manual pages for update-rc.d ( man update-rc.d ). And also get acquainted with the levels of loading (see folders /etc/rc0.d, /etc/rc5.d, etc.). You can read about download levels here .