Posts

Showing posts from January 2, 2020

Run A Program On Startup

Run A Program On Startup (Console On Ubuntu 18.04) As an alternative to using the GUI startup configuration tool or rc.local, you can use the crontab -e command to add a program to the cron job scheduler, so that it will launch it at startup, even if there is no GUI installed (useful for Ubuntu servers). First, type: crontab -e Afterwards, it may ask you the following. Select the number that corresponds to your preferred text editor: no crontab for username - using an empty one Select an editor. To change later, run 'select-editor'. 1. /bin/nano <---- easiest 2. /usr/bin/vim.basic 3. /usr/bin/vim.tiny 4. /bin/ed Choose 1-4 [1]: 1 I selected Nano, as that is my preferred text editor. You may see something like: # Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the ti