Skip to content

Commit

Permalink
Replace # with $ in shell snippets
Browse files Browse the repository at this point in the history
Remove it where the output isn't shown.
  • Loading branch information
tamird committed Nov 27, 2024
1 parent ca08431 commit a98644f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/book/programs/cgroup-skb.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ The most common locations are either `/sys/fs/cgroup` or `/sys/fs/cgroup/unified
Inside that location, we need to create our new cgroup (as root):

```console
# mkdir /sys/fs/cgroup/foo
mkdir /sys/fs/cgroup/foo
```

Then run the program with:
Expand All @@ -137,7 +137,7 @@ RUST_LOG=info cargo xtask run
And then, in a separate terminal, as root, try to access `1.1.1.1`:

```console
# bash -c "echo \$$ >> /sys/fs/cgroup/foo/cgroup.procs && curl 1.1.1.1"
bash -c "echo \$$ >> /sys/fs/cgroup/foo/cgroup.procs && curl 1.1.1.1"
```

That command should hang and the logs of our program should look like:
Expand All @@ -151,7 +151,7 @@ On the other hand, accessing any other address should be successful, for
example:

```console
# bash -c "echo \$$ >> /sys/fs/cgroup/foo/cgroup.procs && curl google.com"
$ bash -c "echo \$$ >> /sys/fs/cgroup/foo/cgroup.procs && curl google.com"
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
Expand Down
6 changes: 3 additions & 3 deletions docs/book/programs/lsm.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ Then rebuilding the GRUB configuration with any of the commands listed below
(each of them might be available or not in different Linux distributions):

```console
# update-grub2
update-grub2
```

```console
# grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg
```

```console
# grub-mkconfig -o /boot/grub/grub.cfg
grub-mkconfig -o /boot/grub/grub.cfg
```

And finally, rebooting the system.
Expand Down

0 comments on commit a98644f

Please sign in to comment.