Skip to content

Instantly share code, notes, and snippets.

@EngKhaledB
Last active November 16, 2018 10:40
Show Gist options
  • Save EngKhaledB/eb63240e706e570b1374e20b7e1961e3 to your computer and use it in GitHub Desktop.
Save EngKhaledB/eb63240e706e570b1374e20b7e1961e3 to your computer and use it in GitHub Desktop.
List of helpful commands snippets I searched for, and helped me.

List of helpful commands snippets I searched for, and helped me.

Run command in background with no-output ( Hide the optput ).

nohup command > /dev/null 2>&1 &

Run command on startup

  1. create /etc/systemd/system/foo.service
    [Unit]
    Description=Job that runs your user script

    [Service]
    ExecStart=/some/command
    Type=oneshot
    RemainAfterExit=yes

    [Install]
    WantedBy=multi-user.target
  1. Then run:
    sudo systemctl daemon-reload
    sudo systemctl enable foo.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment