Skip to content

Commit 57ba64b

Browse files
authored
e2label, swapon, swapoff, chown, passwd, ventoy: add sudo (#19267)
1 parent a94ba63 commit 57ba64b

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

pages/common/chown.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@
55
66
- Change the owner user of a file/directory:
77

8-
`chown {{user}} {{path/to/file_or_directory}}`
8+
`sudo chown {{user}} {{path/to/file_or_directory}}`
99

1010
- Change the owner user and group of a file/directory:
1111

12-
`chown {{user}}:{{group}} {{path/to/file_or_directory}}`
12+
`sudo chown {{user}}:{{group}} {{path/to/file_or_directory}}`
1313

1414
- Change the owner user and group to both have the name `user`:
1515

16-
`chown {{user}}: {{path/to/file_or_directory}}`
16+
`sudo chown {{user}}: {{path/to/file_or_directory}}`
1717

1818
- Recursively change the owner of a directory and its contents:
1919

20-
`chown {{[-R|--recursive]}} {{user}} {{path/to/directory}}`
20+
`sudo chown {{[-R|--recursive]}} {{user}} {{path/to/directory}}`
2121

2222
- Change the owner of a symbolic link:
2323

24-
`chown {{[-h|--no-dereference]}} {{user}} {{path/to/symlink}}`
24+
`sudo chown {{[-h|--no-dereference]}} {{user}} {{path/to/symlink}}`
2525

2626
- Change the owner of a file/directory to match a reference file:
2727

28-
`chown --reference {{path/to/reference_file}} {{path/to/file_or_directory}}`
28+
`sudo chown --reference {{path/to/reference_file}} {{path/to/file_or_directory}}`

pages/common/passwd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
- Change the password of a specific user:
1111

12-
`passwd {{username}}`
12+
`sudo passwd {{username}}`
1313

1414
- Get the current status of the user:
1515

pages/linux/e2label.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
66
- Change the volume label on a specific ext partition:
77

8-
`e2label {{/dev/sda1}} "{{label_name}}"`
8+
`sudo e2label {{/dev/sda1}} "{{label_name}}"`

pages/linux/swapoff.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
77
- Disable a given swap area:
88

9-
`swapoff {{path/to/file}}`
9+
`sudo swapoff {{path/to/file}}`
1010

1111
- Disable all swap areas in `/proc/swaps`:
1212

13-
`swapoff {{[-a|--all]}}`
13+
`sudo swapoff {{[-a|--all]}}`
1414

1515
- Disable a swap partition by its label:
1616

17-
`swapoff -L {{label}}`
17+
`sudo swapoff -L {{label}}`

pages/linux/swapon.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
- Enable a given swap area:
1212

13-
`swapon {{path/to/file}}`
13+
`sudo swapon {{path/to/file}}`
1414

1515
- Enable all swap areas specified in `/etc/fstab` except those with the `noauto` option:
1616

17-
`swapon {{[-a|--all]}}`
17+
`sudo swapon {{[-a|--all]}}`
1818

1919
- Enable a swap partition by its label:
2020

21-
`swapon -L {{label}}`
21+
`sudo swapon -L {{label}}`

pages/linux/ventoy.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,32 @@
55
66
- Install Ventoy to a specific drive with the defaults:
77

8-
`ventoy -i {{/dev/sdX}}`
8+
`sudo ventoy -i {{/dev/sdX}}`
99

1010
- Install Ventoy with GPT partition style instead of MBR:
1111

12-
`ventoy -i -g {{/dev/sdX}}`
12+
`sudo ventoy -i -g {{/dev/sdX}}`
1313

1414
- Install Ventoy with GPT partition style and a custom partition label and secure boot disabled:
1515

16-
`ventoy -i -g -S -L {{LABEL_NAME}} {{/dev/sdX}}`
16+
`sudo ventoy -i -g -S -L {{LABEL_NAME}} {{/dev/sdX}}`
1717

1818
- Install Ventoy and reserve space at the end of the disk:
1919

20-
`ventoy -i -r {{SIZE_MB}} {{/dev/sdX}}`
20+
`sudo ventoy -i -r {{SIZE_MB}} {{/dev/sdX}}`
2121

2222
- Force install Ventoy (overwrites existing installation):
2323

24-
`ventoy -I {{/dev/sdX}}`
24+
`sudo ventoy -I {{/dev/sdX}}`
2525

2626
- Update Ventoy on a drive:
2727

28-
`ventoy -u {{/dev/sdX}}`
28+
`sudo ventoy -u {{/dev/sdX}}`
2929

3030
- Display Ventoy information for a drive:
3131

32-
`ventoy -l {{/dev/sdX}}`
32+
`sudo ventoy -l {{/dev/sdX}}`
3333

3434
- Try non-destructive installation if possible (Ventoy will not reformat the disk):
3535

36-
`ventoy -i -n {{/dev/sdX}}`
36+
`sudo ventoy -i -n {{/dev/sdX}}`

0 commit comments

Comments
 (0)