summarize machinectl and remove uneeded directory
This commit is contained in:
parent
9001d006e4
commit
b4651bdceb
1 changed files with 6 additions and 5 deletions
11
Ubuntu.md
11
Ubuntu.md
|
@ -117,17 +117,18 @@ loginctl enable-linger $ctuser
|
||||||
## Setup $ctuser env
|
## Setup $ctuser env
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> See the following for reasons to use machinectl instead of su
|
> Use machinectl instead of sudo or su to get a shell that is fully isolated
|
||||||
> [RedHat blog post](https://www.redhat.com/en/blog/sudo-rootless-podman)
|
> from the original session. See the developers comments on the problem
|
||||||
>
|
> [with su](https://github.com/systemd/systemd/issues/825#issuecomment-127917622)
|
||||||
> [reddit post](https://old.reddit.com/r/linuxadmin/comments/rxrczr/in_interesting_tidbit_i_just_learned_about_the/)
|
> as well as the purpose of
|
||||||
|
> [machinectl shell](https://github.com/systemd/systemd/pull/1022#issuecomment-136133244)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Switch to $ctuser
|
# Switch to $ctuser
|
||||||
# Note do not remove the trailing @
|
# Note do not remove the trailing @
|
||||||
machinectl shell $ctuser@ /bin/bash
|
machinectl shell $ctuser@ /bin/bash
|
||||||
# Create dirs
|
# Create dirs
|
||||||
mkdir -p ~/.config/{containers/systemd,environment.d} ~/containers/storage
|
mkdir -p ~/.config/{containers/systemd,environment.d}
|
||||||
# Prepare `systemd --user` env
|
# Prepare `systemd --user` env
|
||||||
echo 'XDG_RUNTIME_DIR=/run/user/2000' >> ~/.config/environment.d/10-xdg.conf
|
echo 'XDG_RUNTIME_DIR=/run/user/2000' >> ~/.config/environment.d/10-xdg.conf
|
||||||
# Enable container auto-update
|
# Enable container auto-update
|
||||||
|
|
Loading…
Add table
Reference in a new issue