Guest User

Untitled

a guest
Nov 16th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. # List of helpful commands snippets I searched for, and helped me.
  2.  
  3. ## Run command in background with no-output ( Hide the optput ).
  4. `nohup command > /dev/null 2>&1 &`
  5.  
  6. ## Run command on startup
  7. 1. create /etc/systemd/system/foo.service
  8. ```
  9. [Unit]
  10. Description=Job that runs your user script
  11.  
  12. [Service]
  13. ExecStart=/some/command
  14. Type=oneshot
  15. RemainAfterExit=yes
  16.  
  17. [Install]
  18. WantedBy=multi-user.target
  19. ```
  20. 2. Then run:
  21. ```
  22. sudo systemctl daemon-reload
  23. sudo systemctl enable foo.service
  24. ```
Add Comment
Please, Sign In to add comment