Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux_commands [2020/04/09 14:33] – created misaka00251 | linux_commands [2022/03/02 15:14] (current) – Add tmux misaka00251 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Linux Commands ====== | ====== Linux Commands ====== | ||
+ | |||
+ | ===== tmux ===== | ||
+ | |||
+ | |||
+ | < | ||
+ | tmux new -s build | ||
+ | tmux detach | ||
+ | tmux ls | ||
+ | tmux attach -t 0 | ||
+ | tmux kill-session -t 0 | ||
+ | tmux switch -t 0 | ||
+ | tmux rename-session -t 0 < | ||
+ | </ | ||
+ | |||
+ | To create a new tab, '' | ||
+ | |||
+ | Switch between tabs, '' | ||
===== Copy ===== | ===== Copy ===== | ||
Line 11: | Line 28: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | |||
+ | ===== Systemd ===== | ||
+ | |||
+ | A sample service file: | ||
+ | |||
+ | <code - gitea.service> | ||
+ | [Unit] | ||
+ | Description=Gitea (Git with a cup of tea) | ||
+ | After=syslog.target | ||
+ | After=network.target | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | [Service] | ||
+ | # | ||
+ | # | ||
+ | RestartSec=2s | ||
+ | Type=simple | ||
+ | User=git | ||
+ | Group=git | ||
+ | WorkingDirectory=/ | ||
+ | ExecStart=/ | ||
+ | Restart=always | ||
+ | # | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </ | ||
+ | |||
+ | So, the right way to implement '' | ||
+ | |||
+ | In normal installations this will create a directory ''/ | ||
+ | |||
+ | For instance, in a file / | ||
+ | |||
+ | < | ||
+ | [Service] | ||
+ | Environment=" | ||
+ | Environment=" | ||
+ | Environment=" | ||
+ | </ | ||
+ | |||
+ | Also note that if the directory exists and is empty, your service will be disabled! If you don't intend to put something in the directory, ensure that it does not exist. | ||
+ | |||
+ | [[https:// |