From 8aede1117002f8dcad779236e4eed090139a4286 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sun, 9 Nov 2025 16:24:59 +0200 Subject: [PATCH] ufw, hwclock, zypper, lsusb, lvs, vgs, pvs: add sudo (#19276) --- pages/linux/hwclock.md | 6 +++--- pages/linux/lsusb.md | 4 ++-- pages/linux/lvs.md | 14 +++++++------- pages/linux/pvs.md | 14 +++++++------- pages/linux/ufw.md | 16 ++++++++-------- pages/linux/vgs.md | 14 +++++++------- pages/linux/zypper.md | 8 ++++---- 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/pages/linux/hwclock.md b/pages/linux/hwclock.md index 4bed680cbd..57435f0f52 100644 --- a/pages/linux/hwclock.md +++ b/pages/linux/hwclock.md @@ -5,12 +5,12 @@ - Display the current time as reported by the hardware clock: -`hwclock` +`sudo hwclock` - Write the current software clock time to the hardware clock (sometimes used during system setup): -`hwclock {{[-w|--systohc]}}` +`sudo hwclock {{[-w|--systohc]}}` - Write the current hardware clock time to the software clock: -`hwclock {{[-s|--hctosys]}}` +`sudo hwclock {{[-s|--hctosys]}}` diff --git a/pages/linux/lsusb.md b/pages/linux/lsusb.md index 7a51f87131..fb00802ccf 100644 --- a/pages/linux/lsusb.md +++ b/pages/linux/lsusb.md @@ -13,11 +13,11 @@ - List verbose information about USB devices: -`lsusb {{[-v|--verbose]}}` +`sudo lsusb {{[-v|--verbose]}}` - List detailed information about a USB device: -`lsusb {{[-v|--verbose]}} -s {{bus}}:{{device number}}` +`sudo lsusb {{[-v|--verbose]}} -s {{bus}}:{{device number}}` - List devices with a specified vendor and product ID only: diff --git a/pages/linux/lvs.md b/pages/linux/lvs.md index f1da94f601..9a7a04e7f4 100644 --- a/pages/linux/lvs.md +++ b/pages/linux/lvs.md @@ -6,28 +6,28 @@ - Display information about logical volumes: -`lvs` +`sudo lvs` - Display all logical volumes: -`lvs {{[-a|--all]}}` +`sudo lvs {{[-a|--all]}}` - Change default display to show more details: -`lvs {{[-v|--verbose]}}` +`sudo lvs {{[-v|--verbose]}}` - Display only specific fields: -`lvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` +`sudo lvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` - Append field to default display: -`lvs {{[-o|--options]}} +{{field_name}}` +`sudo lvs {{[-o|--options]}} +{{field_name}}` - Suppress heading line: -`lvs --noheadings` +`sudo lvs --noheadings` - Use a separator to separate fields: -`lvs --separator {{=}}` +`sudo lvs --separator {{=}}` diff --git a/pages/linux/pvs.md b/pages/linux/pvs.md index ef6a9978ae..a16a312703 100644 --- a/pages/linux/pvs.md +++ b/pages/linux/pvs.md @@ -6,28 +6,28 @@ - Display information about physical volumes: -`pvs` +`sudo pvs` - Display non-physical volumes: -`pvs {{[-a|--all]}}` +`sudo pvs {{[-a|--all]}}` - Change default display to show more details: -`pvs {{[-v|--verbose]}}` +`sudo pvs {{[-v|--verbose]}}` - Display only specific fields: -`pvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` +`sudo pvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` - Append field to default display: -`pvs {{[-o|--options]}} +{{field_name}}` +`sudo pvs {{[-o|--options]}} +{{field_name}}` - Suppress heading line: -`pvs --noheadings` +`sudo pvs --noheadings` - Use separator to separate fields: -`pvs --separator {{special_character}}` +`sudo pvs --separator {{special_character}}` diff --git a/pages/linux/ufw.md b/pages/linux/ufw.md index e5bed2778f..99dbe74425 100644 --- a/pages/linux/ufw.md +++ b/pages/linux/ufw.md @@ -6,32 +6,32 @@ - Enable `ufw`: -`ufw enable` +`sudo ufw enable` - Disable `ufw`: -`ufw disable` +`sudo ufw disable` - Show `ufw` rules, along with their numbers: -`ufw status numbered` +`sudo ufw status numbered` - Allow incoming traffic on port 5432 on this host with a comment identifying the service: -`ufw allow 5432 comment "{{Service}}"` +`sudo ufw allow 5432 comment "{{Service}}"` - Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22: -`ufw allow proto tcp from 192.168.0.4 to any port 22` +`sudo ufw allow proto tcp from 192.168.0.4 to any port 22` - Deny traffic on port 80 on this host: -`ufw deny 80` +`sudo ufw deny 80` - Deny all UDP traffic to ports in range 8412:8500: -`ufw deny proto udp from any to any port 8412:8500` +`sudo ufw deny proto udp from any to any port 8412:8500` - Delete a particular rule. The rule number can be retrieved from the `ufw status numbered` command: -`ufw delete {{rule_number}}` +`sudo ufw delete {{rule_number}}` diff --git a/pages/linux/vgs.md b/pages/linux/vgs.md index a75f64e660..60b61d5923 100644 --- a/pages/linux/vgs.md +++ b/pages/linux/vgs.md @@ -6,28 +6,28 @@ - Display information about volume groups: -`vgs` +`sudo vgs` - Display all volume groups: -`vgs {{[-a|--all]}}` +`sudo vgs {{[-a|--all]}}` - Change default display to show more details: -`vgs {{[-v|--verbose]}}` +`sudo vgs {{[-v|--verbose]}}` - Display only specific fields: -`vgs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` +`sudo vgs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` - Append field to default display: -`vgs {{[-o|--options]}} +{{field_name}}` +`sudo vgs {{[-o|--options]}} +{{field_name}}` - Suppress heading line: -`vgs --noheadings` +`sudo vgs --noheadings` - Use separator to separate fields: -`vgs --separator =` +`sudo vgs --separator =` diff --git a/pages/linux/zypper.md b/pages/linux/zypper.md index a5679c18b4..e3e475a0ae 100644 --- a/pages/linux/zypper.md +++ b/pages/linux/zypper.md @@ -6,19 +6,19 @@ - Synchronize list of packages and versions available: -`zypper {{[ref|refresh]}}` +`sudo zypper {{[ref|refresh]}}` - Install a new package: -`zypper {{[in|install]}} {{package}}` +`sudo zypper {{[in|install]}} {{package}}` - Remove a package: -`zypper {{[rm|remove]}} {{package}}` +`sudo zypper {{[rm|remove]}} {{package}}` - Upgrade installed packages to the newest available versions: -`zypper {{[up|update]}}` +`sudo zypper {{[up|update]}}` - Search package via keyword: