Command hub

Security & Permissions commands

Practical Windows-to-Linux security mappings for privilege elevation, accounts, groups, hashes, firewall rules, ownership and disk encryption.

AuditingCapabilitiesCertificatesDisk & StorageEncryptionFile SystemFirewallIdentityIntegrityNetworkingPermissionsPolicyPrivilegeSSH KeysSystemUsers & Groups

Distro notes

Debian/Ubuntu vs Fedora vs Arch

Security & Permissions

Debian/Ubuntu apt sudo apt install ufw acl cryptsetup openssh-client

Ubuntu commonly uses ufw as a simpler frontend to nftables.

Fedora dnf sudo dnf install firewalld acl cryptsetup openssh-clients

Fedora commonly uses firewalld; firewall-cmd is the normal admin tool.

Arch pacman sudo pacman -S ufw nftables acl cryptsetup openssh

Arch leaves more policy choices to you; enable the firewall service you choose.

Guides

All Security & Permissions command guides

51 mappings · 14 expanded guides

auditpol /get→sudo auditctl -s Quick reference Auditing Show audit status Displays Linux audit subsystem status. Distro equivalents Debian/Ubuntu sudo auditctl -s Fedora sudo auditctl -s Arch sudo auditctl -s Open quick reference → auditpol /set→sudo auditctl -w /path -p wa -k KEY Quick reference Auditing Add audit watch Creates an audit rule for file writes/attribute changes. Distro equivalents Debian/Ubuntu sudo auditctl -w /path -p wa -k KEY Fedora sudo auditctl -w /path -p wa -k KEY Arch sudo auditctl -w /path -p wa -k KEY Open quick reference → getcap→getcap -r / 2>/dev/null Quick reference Capabilities List file capabilities Shows Linux file capabilities. Distro equivalents Debian/Ubuntu getcap -r / 2>/dev/null Fedora getcap -r / 2>/dev/null Arch getcap -r / 2>/dev/null Open quick reference → setcap→sudo setcap cap_net_bind_service=+ep /path/to/bin Quick reference Capabilities Grant file capability Gives a binary a specific kernel capability. Distro equivalents Debian/Ubuntu sudo setcap cap_net_bind_service=+ep /path/to/bin Fedora sudo setcap cap_net_bind_service=+ep /path/to/bin Arch sudo setcap cap_net_bind_service=+ep /path/to/bin Open quick reference → certmgr.msc→trust list Quick reference Certificates List trusted certificates Lists trusted certificate anchors where p11-kit trust is used. Distro equivalents Debian/Ubuntu trust list Fedora trust list Arch trust list Open quick reference → certutil -verify→openssl verify -CAfile ca.pem cert.pem Quick reference Certificates Verify certificate Checks a certificate against a CA file. Distro equivalents Debian/Ubuntu openssl verify -CAfile ca.pem cert.pem Fedora openssl verify -CAfile ca.pem cert.pem Arch openssl verify -CAfile ca.pem cert.pem Open quick reference → manage-bde→sudo cryptsetup luksOpen /dev/sdb1 secure Expanded guide Disk & Storage Manage encrypted volumes Creates, opens and closes LUKS-encrypted Linux block devices. Distro equivalents Debian/Ubuntu sudo cryptsetup luksOpen /dev/sdb1 secure Fedora sudo cryptsetup luksOpen /dev/sdb1 secure Arch sudo cryptsetup luksOpen /dev/sdb1 secure Open expanded guide → cipher /d→gpg -d file.gpg > file Quick reference Encryption Decrypt file Decrypts a GPG-encrypted file. Distro equivalents Debian/Ubuntu gpg -d file.gpg > file Fedora gpg -d file.gpg > file Arch gpg -d file.gpg > file Open quick reference → cipher /e→gpg -c file Quick reference Encryption Encrypt file symmetrically Encrypts a file with a passphrase using GnuPG. Distro equivalents Debian/Ubuntu gpg -c file Fedora gpg -c file Arch gpg -c file Open quick reference → manage-bde -lock→sudo cryptsetup close mapper_name Quick reference Encryption Lock encrypted volume Closes a LUKS encrypted mapping. Distro equivalents Debian/Ubuntu sudo cryptsetup close mapper_name Fedora sudo cryptsetup close mapper_name Arch sudo cryptsetup close mapper_name Open quick reference → manage-bde -status→sudo cryptsetup status mapper_name Quick reference Encryption Check encrypted volume Shows status for a LUKS mapping. Distro equivalents Debian/Ubuntu sudo cryptsetup status mapper_name Fedora sudo cryptsetup status mapper_name Arch sudo cryptsetup status mapper_name Open quick reference → manage-bde -unlock→sudo cryptsetup open /dev/sdXn mapper_name Quick reference Encryption Unlock encrypted volume Opens a LUKS encrypted block device. Distro equivalents Debian/Ubuntu sudo cryptsetup open /dev/sdXn mapper_name Fedora sudo cryptsetup open /dev/sdXn mapper_name Arch sudo cryptsetup open /dev/sdXn mapper_name Open quick reference → attrib→chmod / chown Expanded guide File System Change file permissions/attributes Controls who can read, write, or execute a file. Linux uses a more powerful permission model than Windows. Distro equivalents Debian/Ubuntu chmod / chown Fedora chmod / chown Arch chmod / chown Open expanded guide → cacls / icacls→getfacl / setfacl Expanded guide File System Advanced file access control lists (ACL) Views and sets fine-grained file permissions beyond the basic owner/group/other model. Distro equivalents Debian/Ubuntu getfacl / setfacl Fedora getfacl / setfacl Arch getfacl / setfacl Open expanded guide → takeown→sudo chown user:group path Expanded guide File System Change file ownership Changes the user or group that owns a file or directory. Distro equivalents Debian/Ubuntu sudo chown user:group path Fedora sudo chown user:group path Arch sudo chown user:group path Open expanded guide → verify / certutil -hashfile→sha256sum Expanded guide File System Verify file integrity with checksums Generates or checks checksums to verify that files have not been corrupted or tampered with. Distro equivalents Debian/Ubuntu sha256sum Fedora sha256sum Arch sha256sum Open expanded guide → netsh advfirewall firewall add rule→sudo ufw allow 22/tcp Quick reference Firewall Add firewall allow rule Allows inbound traffic to a port. Distro equivalents Debian/Ubuntu sudo ufw allow 22/tcp Fedora sudo firewall-cmd --add-service=ssh --permanent && sudo firewall-cmd --reload Arch sudo ufw allow 22/tcp Open quick reference → netsh advfirewall set allprofiles state off→sudo ufw disable Quick reference Firewall Disable firewall Disables the firewall frontend. Distro equivalents Debian/Ubuntu sudo ufw disable Fedora sudo systemctl disable --now firewalld Arch sudo ufw disable Open quick reference → netsh advfirewall show allprofiles→sudo ufw status verbose Quick reference Firewall Show firewall status Displays firewall state and active rules. Distro equivalents Debian/Ubuntu sudo ufw status verbose Fedora sudo firewall-cmd --list-all Arch sudo nft list ruleset Open quick reference → wf.msc→gufw Quick reference Firewall Open graphical firewall Opens a graphical firewall frontend when installed. Distro equivalents Debian/Ubuntu gufw Fedora firewall-config Arch gufw Open quick reference → whoami /all→id && sudo -l Quick reference Identity Show identity and privileges Shows user/group IDs and sudo privileges. Distro equivalents Debian/Ubuntu id && sudo -l Fedora id && sudo -l Arch id && sudo -l Open quick reference → whoami /groups→id Quick reference Identity Show group memberships Shows current user and group IDs. Distro equivalents Debian/Ubuntu id Fedora id Arch id Open quick reference → whoami /priv→sudo -l Quick reference Identity Show elevated privileges Lists allowed sudo commands for the current user. Distro equivalents Debian/Ubuntu sudo -l Fedora sudo -l Arch sudo -l Open quick reference → whoami /user→id -un Quick reference Identity Show current username Prints the current user name. Distro equivalents Debian/Ubuntu id -un Fedora id -un Arch id -un Open quick reference → Get-AuthenticodeSignature→gpg --verify file.sig file Quick reference Integrity Verify file signature Verifies a detached GPG signature. Distro equivalents Debian/Ubuntu gpg --verify file.sig file Fedora gpg --verify file.sig file Arch gpg --verify file.sig file Open quick reference → sigcheck→debsums -s Quick reference Integrity Verify installed package files Checks installed files against package checksums. Distro equivalents Debian/Ubuntu debsums -s Fedora sudo rpm -Va Arch sudo pacman -Qkk Open quick reference → netsh advfirewall (firewall rules)→ufw Expanded guide Networking Manage firewall rules Controls which network traffic is allowed through the system's firewall. Distro equivalents Debian/Ubuntu sudo ufw allow 22/tcp Fedora sudo firewall-cmd --add-service=ssh --permanent && sudo firewall-cmd --reload Arch sudo ufw allow 22/tcp Open expanded guide → chgrp→sudo chgrp group file Quick reference Permissions Change file group Changes group ownership. Distro equivalents Debian/Ubuntu sudo chgrp group file Fedora sudo chgrp group file Arch sudo chgrp group file Open quick reference → chmod numeric mode→chmod 755 file Quick reference Permissions Set numeric permissions Sets Unix permissions using octal mode. Distro equivalents Debian/Ubuntu chmod 755 file Fedora chmod 755 file Arch chmod 755 file Open quick reference → chmod symbolic mode→chmod u+x script.sh Quick reference Permissions Set symbolic permissions Adds or removes permission bits symbolically. Distro equivalents Debian/Ubuntu chmod u+x script.sh Fedora chmod u+x script.sh Arch chmod u+x script.sh Open quick reference → umask→umask 027 Quick reference Permissions Set default permissions mask Controls default permissions for newly created files. Distro equivalents Debian/Ubuntu umask 027 Fedora umask 027 Arch umask 027 Open quick reference → secpol.msc password policy→chage -l username Quick reference Policy Inspect password aging Shows password-aging settings for a user. Distro equivalents Debian/Ubuntu chage -l username Fedora chage -l username Arch chage -l username Open quick reference → visudo→sudo visudo Quick reference Privilege Safely edit sudoers Edits sudo policy with syntax checking. Distro equivalents Debian/Ubuntu sudo visudo Fedora sudo visudo Arch sudo visudo Open quick reference → ssh-add on Windows→ssh-add ~/.ssh/id_ed25519 Quick reference SSH Keys Load SSH key into agent Adds a private key to the SSH authentication agent. Distro equivalents Debian/Ubuntu ssh-add ~/.ssh/id_ed25519 Fedora ssh-add ~/.ssh/id_ed25519 Arch ssh-add ~/.ssh/id_ed25519 Open quick reference → ssh-keygen on Windows→ssh-keygen -t ed25519 -C "you@example.com" Quick reference SSH Keys Create SSH key Generates an Ed25519 SSH key pair. Distro equivalents Debian/Ubuntu ssh-keygen -t ed25519 -C "you@example.com" Fedora ssh-keygen -t ed25519 -C "you@example.com" Arch ssh-keygen -t ed25519 -C "you@example.com" Open quick reference → runas→sudo Expanded guide System Run command as administrator Executes a command with elevated privileges (as root/superuser). Distro equivalents Debian/Ubuntu sudo Fedora sudo Arch sudo Open expanded guide → net accounts /maxpwage→sudo chage -M DAYS username Quick reference Users & Groups Set password maximum age Configures password aging for a local account. Distro equivalents Debian/Ubuntu sudo chage -M DAYS username Fedora sudo chage -M DAYS username Arch sudo chage -M DAYS username Open quick reference → net localgroup→groupadd / groups Expanded guide Users & Groups Manage user groups Creates groups, adds users to groups, and lists group memberships. Distro equivalents Debian/Ubuntu groupadd / groups Fedora groupadd / groups Arch groupadd / groups Open expanded guide → net localgroup group /add→sudo groupadd group Quick reference Users & Groups Create group Creates a local Unix group. Distro equivalents Debian/Ubuntu sudo groupadd group Fedora sudo groupadd group Arch sudo groupadd group Open quick reference → net localgroup group user /delete→sudo gpasswd -d user group Quick reference Users & Groups Remove user from group Deletes a user membership from a group. Distro equivalents Debian/Ubuntu sudo gpasswd -d user group Fedora sudo gpasswd -d user group Arch sudo gpasswd -d user group Open quick reference → net session / query user→who / w / last Expanded guide Users & Groups See who is currently logged in Lists currently logged-in users, what they are doing, and recent login history. Distro equivalents Debian/Ubuntu who / w / last Fedora who / w / last Arch who / w / last Open expanded guide → net user→useradd / usermod Expanded guide Users & Groups Create and manage user accounts Adds new users, changes user properties, and manages user accounts on the system. Distro equivalents Debian/Ubuntu useradd / usermod Fedora useradd / usermod Arch useradd / usermod Open expanded guide → net user username /active:no→sudo usermod -L USER Expanded guide Users & Groups Lock a user account Locks password-based login for a local account without deleting the account or its files. Distro equivalents Debian/Ubuntu sudo usermod -L USER Fedora sudo usermod -L USER Arch sudo usermod -L USER Open expanded guide → net user username /active:yes→sudo usermod -U USER Expanded guide Users & Groups Unlock a user account Re-enables password authentication for a previously locked account. Distro equivalents Debian/Ubuntu sudo usermod -U USER Fedora sudo usermod -U USER Arch sudo usermod -U USER Open expanded guide → net user username /delete→sudo userdel -r username Quick reference Users & Groups Delete user account Removes a local user and optionally their home directory. Distro equivalents Debian/Ubuntu sudo userdel -r username Fedora sudo userdel -r username Arch sudo userdel -r username Open quick reference → net user username /expires→sudo chage -E YYYY-MM-DD username Quick reference Users & Groups Set account expiry Sets an expiration date for a user account. Distro equivalents Debian/Ubuntu sudo chage -E YYYY-MM-DD username Fedora sudo chage -E YYYY-MM-DD username Arch sudo chage -E YYYY-MM-DD username Open quick reference → net user username /passwordreq→passwd Expanded guide Users & Groups Change user passwords Sets or changes a user account password. Distro equivalents Debian/Ubuntu passwd Fedora passwd Arch passwd Open expanded guide → net user username password→sudo passwd username Quick reference Users & Groups Change user password Sets or changes a local user password. Distro equivalents Debian/Ubuntu sudo passwd username Fedora sudo passwd username Arch sudo passwd username Open quick reference → passwd -l→sudo passwd -l username Quick reference Users & Groups Lock password login Locks a user password. Distro equivalents Debian/Ubuntu sudo passwd -l username Fedora sudo passwd -l username Arch sudo passwd -l username Open quick reference → passwd -u→sudo passwd -u username Quick reference Users & Groups Unlock password login Unlocks a user password. Distro equivalents Debian/Ubuntu sudo passwd -u username Fedora sudo passwd -u username Arch sudo passwd -u username Open quick reference → runas /user→sudo -u USER command Expanded guide Users & Groups Run a command as another user Executes one command or opens a login shell using another user account. Distro equivalents Debian/Ubuntu sudo -u USER command Fedora sudo -u USER command Arch sudo -u USER command Open expanded guide →