Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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
- ```
- 2. Then run:
- ```
- sudo systemctl daemon-reload
- sudo systemctl enable foo.service
- ```
Add Comment
Please, Sign In to add comment