P
P
Pavel2020-06-01 13:13:55
ubuntu
Pavel, 2020-06-01 13:13:55

How to execute commands when starting ubuntu 20.04?

I'm new to Ubuntu, but in general I'm familiar with the terminal, I googled different options, but they don't work.
Basically, it says you need to execute commands through rc.local , but as I understand it, it doesn't exist in 20.04, even 18.04 didn't exist, or maybe I'm not right)
in any case, tell me the latest information on how to execute commands at system startup?
I need to mount disks, run programs and a couple more console commands

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2020-06-01
@mrusklon

mount disks - edit /etc/fstab , configure autofs service to
run programs, and execute commands - add scripts to cron, @reboot event.
Like this:
@reboot /usr/loca/bin/startup.sh > /var/log/startup.log

P
pfg21, 2020-06-01
@pfg21

stationary disk mounting is written in /etc/fstab
running commands myunit.service + myunit.timer for me so the torrent daemon starts five minutes after downloading.
launching a program with a graphical interface, see the options of your desktop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question