mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-22 00:06:29 -05:00
Updated post to include systemd-run
This commit is contained in:
parent
c0cb79a8b5
commit
e31b53d214
1 changed files with 29 additions and 1 deletions
|
@ -5,7 +5,35 @@ draft: false
|
|||
tags: []
|
||||
---
|
||||
|
||||
Normally when you launch an application through the terminal, the standard output appears, and closing the terminal closes the application. The `nohup` command allows applications to run regardless of any hangups sent. Combine that with making it a background task, and you have a quick and easy way to launch applications through the terminal.
|
||||
Normally when you launch an application through the terminal, the standard output appears, and closing the terminal closes the application.
|
||||
|
||||
## Using `systemd`
|
||||
|
||||
[Tem Tem](https://fosstodon.org/@ralismark) recently [tooted](https://fosstodon.org/@ralismark/108266728217245129)
|
||||
a [blog post](https://www.ralismark.xyz/posts/systemd-run) they wrote on replacing `nohup` with `systemd-run`
|
||||
|
||||
|
||||
To run a graphical application it's as easy as:
|
||||
```bash
|
||||
systemd-run --user application
|
||||
```
|
||||
|
||||
If you want to see any of the application terminal output,
|
||||
then when the service is running you can check the status
|
||||
like any other systemd service.
|
||||
```bash
|
||||
systemd --user status application
|
||||
```
|
||||
|
||||
Check out Tem Tem's [blog post](https://www.ralismark.xyz/posts/systemd-run) for more on `systemd-run`!
|
||||
|
||||
|
||||
## Using `nohup` (Legacy)
|
||||
|
||||
When the terminal closes, it sends a hangup signal to all of the processes it manages.
|
||||
The `nohup` command allows applications to run regardless of any hangups sent.
|
||||
Combine that with making it a background task,
|
||||
and you have a quick and easy way to launch applications through the terminal.
|
||||
|
||||
```bash
|
||||
nohup application > /dev/null &
|
||||
|
|
Loading…
Reference in a new issue