★ Online safety: PII, social media, cyberbullying
- Learn
- Practice
- No hands-on practice yet.
- Check
Every concept and command in the course: where to learn it and where to practice it. ★ marks what every track needs.
Learn links open Defense Ladder at the exact unit. Practice lists the drills and labs, with where to look inside each.
lusrmgr.msc; Get-LocalUser; Disable-LocalUser -Name Guest; Remove-LocalUser -Name <u>awk -F: '$3>=1000 && $3<65534' /etc/passwd; deluser --remove-home <u>; passwd -l <u>pw userdel <u> -r; pw lock <u>show running-config | include username; no username <u>Get-LocalGroupMember -Group Administrators; Remove-LocalGroupMember; domain: Domain Adminsgetent group sudo; gpasswd -d <u> sudo; visudo and /etc/sudoers.d (look for NOPASSWD)pw groupshow wheel; pw groupmod wheel -d <u>username <u> privilege 15 grants full access; keep it to authorized adminssecpol.msc > Account Policies > Password Policy; net accounts /minpwlen:12 /maxpwage:60 /minpwage:1 /uniquepw:24; domain: Default Domain Policy GPO/etc/login.defs (PASS_MAX_DAYS, PASS_MIN_DAYS, PASS_WARN_AGE); chage -M -m -W; libpam-pwquality in /etc/pam.d/common-passwordsecurity passwords min-length 10; enable secret and username ... secretsecpol.msc > Account Lockout Policy; net accounts /lockoutthreshold:5 /lockoutduration:30 /lockoutwindow:30pam_faillock: /etc/security/faillock.conf (deny, unlock_time)login block-for 120 attempts 3 within 60no auto-login; RDP only if the scenario brief needs it, with Network Level Authentication; interactive logon options in secpol Security Options/etc/ssh/sshd_config: PermitRootLogin no, PermitEmptyPasswords no; no guest or auto-login in the display managerline vty: login local, transport input ssh, exec-timeout; banner motdwf.msc; Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled True -DefaultInboundAction Blockufw default deny incoming; ufw allow 22/tcp (only if required); ufw enable; Debian may need nftables/etc/pf.conf; pfctl -f /etc/pf.conf; pfctl -e; sysrc pf_enable=YESACLs applied with ip access-group filter traffic through the deviceSettings > Windows Update; Get-HotFixapt update && apt upgrade; unattended-upgradesfreebsd-update fetch install; pkg update && pkg upgradeWindows Security > Virus & threat protection; Get-MpComputerStatus; Set-MpPreference -DisableRealtimeMonitoring $false; Update-MpSignatureno built-in antivirus; follow the scenarioservices.msc; Get-Service; Stop-Service then Set-Service -StartupType Disabled; Get-NetTCPConnection -State Listensystemctl list-units --type=service; systemctl disable --now <svc>; ss -tulnp; apt purgeservice -e; sysrc <svc>_enable=NO; sockstat -4 -lno ip http server; transport input sshNTFS permissions and inheritance (Properties > Security, icacls); Get-SmbShare / Remove-SmbShare; disable SMBv1chmod/chown; /etc/shadow should be -rw-r----- root:shadow; find world-writable files; Samba and NFS exportsGet-ChildItem C:\Users -Recurse -Include *.mp3,*.mp4 ...; appwiz.cplfind / -iname '*.mp3' ...; dpkg -l; apt purge <pkg>Task Scheduler (Get-ScheduledTask); startup entries (Get-CimInstance Win32_StartupCommand); Sysinternals Autorunscrontab -l and /etc/cron.*; custom systemd units; ~/.ssh/authorized_keys; SUID files (find / -perm -4000); netcat listenerscrontab; /etc/rc.conf and rc.d scriptsauditpol /get /category:*; Event Viewer Security log; IDs 4624, 4625, 4720, 4732auditd; journalctl; /var/log/auth.log; rsysloglogging buffered; service timestamps log datetimeGet-ChildItem -Recurse -Filter; Get-FileHash -Algorithm SHA256; Select-String; Get-WinEventfind / -iname; grep -rin; sha256sum / md5sum; stat; base64 -ddisable SMBv1 (Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol); check C:\Windows\System32\drivers\etc\hostssysctl (net.ipv4.conf.all.rp_filter=1, kernel.randomize_va_space=2) persisted in /etc/sysctl.d/; /etc/hostsMicrosoft security baselines (Security Compliance Toolkit); secedit /export /cfg baseline.inf records the current policyCIS Benchmark for your distribution; ss -tulpn and systemctl list-unit-files record the starting stateCisco Guide to Harden Cisco IOS Devices; show running-config records the starting stateenable secret; service password-encryption; username <u> secret <p>; ip domain-name + crypto key generate rsa modulus 2048; ip ssh version 2; line vty 0 15 > login local, transport input ssh, exec-timeout 5 0; security passwords min-length 10; login block-for 120 attempts 3 within 60Each track lists its own concepts plus every ★ concept, grade by grade.
Freshman
Sophomore
Junior
Senior
Freshman
Sophomore
Junior
Senior
Freshman
Sophomore
Junior
Senior
Freshman
Sophomore
Junior
Senior
The teaching order: each Defense Ladder unit and the concepts it covers.
Every command in the apps, by system. The interactive page shows each one's options and where it appears.
$PROFILE: Shows the paths of the PowerShell profile scripts, which run every time PowerShell starts, so you can open each one and check for planted commands..\Find-ExtraAdmins.ps1: Runs Find-ExtraAdmins.ps1, the script you write in a Defense Ladder lesson, which prints enabled local administrators missing from the approved list in brief.txt.[Convert]::FromBase64String: Turns Base64 text, such as the string after -EncodedCommand in a suspicious task, back into the bytes it hides, so you can read a command without running it.[Text.Encoding]::Unicode.GetString: Turns bytes into readable text using UTF-16, the encoding PowerShell's -EncodedCommand expects, which finishes decoding a hidden command.accesschk: Lists who may read, write, or change a file, folder, or service, so a permission weak enough for a standard account to take over a service stands out.Add-ADGroupMember: Adds accounts to an Active Directory group, such as putting a new staff member in the department group the brief lists.Add-BitLockerKeyProtector: Adds another way to unlock a BitLocker drive, such as the 48-digit recovery password, so you can still open the drive if the usual method fails.Add-Content: Adds text to the end of a file, creating the file when it is missing, so a log or notes file keeps its earlier lines.Add-LocalGroupMember: Adds a user or group to a local group, for example to give someone Remote Desktop access or administrator rights.Add-MpPreference: Adds an entry to a Microsoft Defender list setting, such as turning on an attack surface reduction rule or adding an exclusion.appwiz.cpl: Opens Programs and Features, the classic list of installed desktop programs, where you uninstall the ones the brief leaves out.arp: Shows the ARP cache, the list matching IP addresses on your network to device MAC addresses, which helps spot ARP spoofing.auditpol: Shows or sets which security events Windows records in the Security log, such as sign-ins, account changes, and new processes, for success and failure.autorunsc: Lists everything set to start automatically, from Run keys and services to scheduled tasks and WMI; it is the command-line version of Autoruns, a separate free download.Backup-BitLockerKeyProtector: Saves a BitLocker recovery password into Active Directory, on the computer's account, so domain admins can find it when a user is locked out.BackupToAAD-BitLockerKeyProtector: Saves a BitLocker recovery password to Microsoft Entra ID (formerly Azure AD), where the user and admins can retrieve it online.C:\Apache24\bin\httpd.exe: Runs the Apache web server's own program on Windows; with -t it checks the configuration files for mistakes before you restart the service.cat: Prints a file's text; in PowerShell on Windows, cat is an alias for Get-Content.cd: Changes the current folder; in Command Prompt, cd alone prints the folder you are in.certutil: Calculates a file's hash, among other jobs; it is the Command Prompt twin of Get-FileHash.chdir: Changes the current folder, exactly like cd.Checkpoint-VM: Saves a checkpoint (snapshot) of a Hyper-V virtual machine, so you can return it to how it is now if a hardening step breaks something.clear: Clears the screen; in PowerShell, clear is an alias for Clear-Host.Clear-Host: Clears the PowerShell window; cls and clear are its short aliases.clip: Copies the text piped into it onto the Windows clipboard, so you can paste a command's output into your notes.cls: Clears the screen of the Command Prompt or PowerShell window.cmd: Opens a new Command Prompt, or with /c runs one command and closes.cmdkey: Lists, adds, or deletes the usernames and passwords Windows has saved in Credential Manager for servers and websites.compmgmt.msc: Opens Computer Management, one window that holds Shared Folders, Event Viewer, Services, Disk Management, and, on Pro and higher, Local Users and Groups.Confirm-SecureBootUEFI: Checks whether Secure Boot is on: True means on, False means off, and an error means the PC boots in legacy BIOS mode.control: Opens Control Panel, or one of its pages such as Programs and Features or System Properties.curl: Fetches a web address from the command line and shows the response, which tests web servers and headers; Windows includes it as curl.exe.date: Shows the date and, in Command Prompt, asks for a new one; in PowerShell, date runs Get-Date.del: Deletes one or more files; with /s it searches subfolders, which removes, for example, every .mp3 under C:\Users in one command.dir: Lists the files and folders in a folder, with sizes and dates.Disable-ADAccount: Disables a domain account, blocking its sign-in across the domain while keeping the account for review.Disable-LocalUser: Disables a local account, blocking its sign-in while keeping the account and its files for later review.Disable-NetFirewallRule: Turns off a Windows Defender Firewall rule while keeping it, which is the reversible way to stop a suspicious rule.Disable-ScheduledTask: Disables a scheduled task so it stops running, while keeping it for review.Disable-WindowsOptionalFeature: Turns off a Windows optional feature, such as SMBv1, the Telnet Client, or the FTP server, which shrinks the attack surface.dsa.msc: Opens Active Directory Users and Computers, the window for managing domain users, groups, computers, and organizational units.dsregcmd: Shows how this PC is joined: to an Active Directory domain, to Microsoft Entra ID in the cloud, to both, or to neither.echo: Prints text on the screen, or into a file with >; in PowerShell, echo is an alias for Write-Output.Enable-ADAccount: Turns a disabled domain account back on.Enable-BitLocker: Turns on BitLocker for a drive and starts encrypting it, using the protector you name, such as the TPM chip, to unlock it at startup.Enable-LocalUser: Turns a disabled local account back on so it can sign in again.Enable-NetFirewallRule: Turns on a Windows Defender Firewall rule that is currently off.Enable-ScheduledTask: Turns a disabled scheduled task back on.Enable-WindowsOptionalFeature: Turns on a Windows optional feature.erase: Deletes one or more files, exactly like del.eventvwr: Opens Event Viewer, the same window as eventvwr.msc, where you browse and filter the Windows logs.eventvwr.msc: Opens Event Viewer, where you browse and filter Windows logs, such as Security sign-in events and System service events.exit: Closes the current Command Prompt or PowerShell session, or ends a remote session such as SSH and returns you to your own machine.explorer: Opens File Explorer, or opens the folder you name in it, such as C:\Users.Export-ScheduledTask: Prints a scheduled task's full definition as XML, its triggers, actions, and run-as account, so you can save the evidence before you delete the task.find: Prints the lines of a file, or of another command's output, that contain a quoted word or phrase; findstr is its more powerful sibling.findstr: Searches text files, or text piped from another command, for lines that contain a word or pattern; it is the Command Prompt twin of Select-String.foreach: Repeats commands once for each item in a list, such as writing the same value into several registry settings.ForEach-Object: Runs a block of commands once for each object coming down the pipeline, where $_ stands for the current object.Format-Hex: Shows a file's raw bytes in hexadecimal; every Windows program starts with the letters MZ, which exposes an .exe disguised as a PDF or picture.Format-List: Prints each object's properties as a list, one property per line, which shows long values in full instead of cutting them off.Format-Table: Prints objects as a table with one column per property, so many items, such as tasks or services, line up on one screen.gc: Prints a file's text; gc is PowerShell's short alias for Get-Content.gci: Lists files and folders; gci is PowerShell's short alias for Get-ChildItem and takes the same options.Get-Acl: Shows a file's or folder's owner and access control list: which users and groups can read, change, or fully control it.Get-ADComputer: Lists computer accounts in Active Directory, with properties such as the operating system, last sign-in, and whether the computer is trusted for delegation.Get-ADDefaultDomainPasswordPolicy: Shows the domain's password and lockout policy that every domain account follows: length, complexity, age, history, and lockout.Get-ADDomain: Shows the Active Directory domain's details: its name, functional level, and the domain controllers that hold its special roles, such as the PDC emulator.Get-ADGroupMember: Lists the members of an Active Directory group, such as Domain Admins, so you can compare privileged groups with the approved list.Get-ADUser: Lists domain user accounts from Active Directory, with properties such as Enabled, PasswordNeverExpires, and group memberships, and finds accounts with risky settings.Get-Alias: Lists PowerShell's short names for commands, so you can see that sc means Set-Content in Windows PowerShell 5.1 and del means Remove-Item.Get-AppxPackage: Lists Microsoft Store (modern) apps installed for you or for every user, and passes them to Remove-AppxPackage to uninstall.Get-AuthenticodeSignature: Checks a file's digital signature and reports whether it is Valid, NotSigned, or tampered with (HashMismatch), and who signed it.Get-BitLockerVolume: Shows each drive's BitLocker state: whether it is encrypted, how far encryption has gone, whether protection is on, and which key protectors unlock it.Get-ChildItem: Lists the files and folders in a location, and with -Recurse searches every folder below it, for example for media files or planted tools.Get-CimInstance: Reads system information from WMI classes such as processes, services, startup items, and network adapters; it is the modern replacement for the deprecated wmic tool.Get-Command: Finds commands by name or pattern, so you can discover which cmdlets exist for a job, such as everything with LocalUser in the name.Get-Content: Prints the text inside a file, such as the hosts file, a config file, or a PowerShell profile; it can also read a file's hidden data streams.Get-DhcpServerInDC: Lists the DHCP servers authorized in Active Directory; any other Windows DHCP server on the network is a rogue.Get-DhcpServerv4Scope: Lists the IPv4 address ranges (scopes) a Windows DHCP server hands out, with their names and whether each is active.Get-DnsServerResourceRecord: Lists the records in a DNS zone on a Windows DNS server, so you can look for stray or planted records.Get-DnsServerZone: Lists the DNS zones a Windows DNS server hosts, with their type, dynamic-update setting, and zone-transfer setting.Get-ExecutionPolicy: Shows PowerShell's script execution policy, which decides whether scripts run and whether they must be signed.Get-FileHash: Calculates a file's fingerprint (SHA-256 by default), so you can compare it with a known-good value or look it up as known malware.Get-GPO: Lists Group Policy Objects in the domain with their status and when each last changed, so you can spot a new or edited one.Get-GPOReport: Writes a readable report of what Group Policy Objects set, as an HTML or XML file you can open in a browser.Get-Help: Shows how to use a cmdlet: what it does, its parameters, and worked examples.Get-History: Lists the commands typed in this PowerShell session; older sessions live in the PSReadLine history file, found with (Get-PSReadLineOption).HistorySavePath.Get-HotFix: Lists installed Windows updates by KB number and install date, so you can check that recent patches are in place.Get-Item: Shows one file, folder, or registry key as an object; with -Stream it lists a file's hidden data streams, such as the Mark of the Web.Get-ItemProperty: Reads the values stored in a registry key, such as the programs in a Run key or the UAC settings.Get-LapsADPassword: Reads a computer's local administrator password that Windows LAPS rotates and stores in Active Directory, for admins who are allowed to see it.Get-LocalGroup: Lists the local groups on this computer, such as Administrators, Users, and Remote Desktop Users.Get-LocalGroupMember: Lists the members of a local group, most often Administrators, so you can compare them with the approved list.Get-LocalUser: Lists the local user accounts on this computer with properties such as Enabled, PasswordRequired, PasswordExpires, and LastLogon.Get-Location: Prints the folder PowerShell is working in right now.Get-Member: Lists the properties and methods of the objects a command returns, so you know which names Select-Object and Where-Object can use.Get-MpComputerStatus: Shows Microsoft Defender's health: whether antivirus and real-time protection are on, when signatures last updated, and whether tamper protection is on.Get-MpPreference: Shows Microsoft Defender's settings, including exclusions, the folders and programs it skips, where attackers hide.Get-MpThreat: Lists the threats Microsoft Defender has found on this computer, with each threat's name and whether it is still active.Get-MpThreatDetection: Lists the malware Microsoft Defender has detected on this computer, with when, which program, and which account was involved.Get-NetFirewallAddressFilter: Shows the local and remote addresses a firewall rule covers, so you can see whether it admits every address or only one subnet.Get-NetFirewallPortFilter: Shows the protocol and ports a firewall rule covers, such as TCP 4444, details the rule list itself leaves out.Get-NetFirewallProfile: Shows the Windows Defender Firewall settings for each profile (Domain, Private, and Public): whether it is on and what it does with unmatched traffic.Get-NetFirewallRule: Lists Windows Defender Firewall rules with their direction, action, and whether each is on, so you can find a rule that lets attackers in.Get-NetTCPConnection: Lists TCP connections and listening ports with the owning process id, so you can trace each open port to the program behind it.Get-NetUDPEndpoint: Lists the UDP ports this computer listens on, with the process id behind each, the UDP half that Get-NetTCPConnection leaves out.Get-Process: Lists running processes with their ids, memory, and CPU use, and can show the program path or the account behind each one.Get-ScheduledTask: Lists scheduled tasks with their folder path and state, so you can find a task that runs a planted script or re-adds a user.Get-Service: Lists Windows services with their status (Running or Stopped) and start type, so you can spot risky or unknown services.Get-SmbClientConfiguration: Shows this computer's SMB client settings, such as whether it requires signing and whether it allows insecure guest sign-ins to other servers.Get-SmbServerConfiguration: Shows this computer's SMB file-sharing server settings, such as whether SMBv1 is on and whether signing and encryption are required.Get-SmbShare: Lists the folders this computer shares over SMB, with their names and paths, so you can remove shares the brief leaves out.Get-SmbShareAccess: Shows who has access to a network share and at what level: Full, Change, or Read.Get-Tpm: Shows whether this PC has a TPM security chip and whether it is enabled and ready for BitLocker and Windows Hello.Get-WebBinding: Lists the protocol, address, port, and host name each IIS website listens on, so you can confirm HTTPS bindings.Get-WebConfigurationProperty: Reads one IIS web server setting, such as whether request logging is on or whether a site requires HTTPS, so you can confirm a change.Get-Website: Lists the websites on an IIS web server with their state and the folder each one serves.Get-WindowsCapability: Lists Windows capabilities, add-ons such as OpenSSH Server that install on demand, and shows which are installed.Get-WindowsFeature: Lists Windows Server roles and features, such as DNS, DHCP, and Web Server, and shows which are installed.Get-WindowsOptionalFeature: Lists Windows optional features, such as SMBv1, the Telnet Client, and IIS, and shows whether each is on.Get-WinEvent: Searches Windows event logs, such as Security and System, for events by log name and event ID, for example failed sign-ins or new services.gpedit.msc: Opens the Local Group Policy Editor, where you change computer and user policy settings, from security options to Windows Update behavior.gpmc.msc: Opens Group Policy Management, where you create, edit, and link Group Policy Objects, including the Default Domain Policy that holds domain password rules.gpresult: Shows which Group Policy Objects applied to this computer and user, and which were filtered out, so you can see where a setting came from.gps: Lists running processes; gps is PowerShell's short alias for Get-Process.gpupdate: Applies Group Policy now instead of waiting for the next refresh, which runs about every 90 minutes.Grant-SmbShareAccess: Gives a user or group access to a network share at the level you choose.gsv: Lists services; gsv is PowerShell's short alias for Get-Service.help: Lists the built-in Command Prompt commands, or with a name shows that command's help; in PowerShell, help shows Get-Help one page at a time.history: Lists the commands typed in this PowerShell session; history is an alias for Get-History.hostname: Prints this computer's name.httpd: Runs the Apache web server's program; with -t it checks the configuration files for mistakes before you restart the service.icacls: Shows or changes NTFS permissions on files and folders: who can read, modify, or fully control them, and whether permissions pass down to items inside.if: Runs commands only when a test is true; hardening steps use it to create a registry key with New-Item only when Test-Path finds the key missing.Import-Module: Loads a PowerShell module so its cmdlets are ready to use, such as WebAdministration for IIS or ActiveDirectory for domain cmdlets.inetmgr: Opens IIS Manager, the window for Windows web and FTP sites, where you can turn off Anonymous Authentication and directory browsing, and require SSL.Install-WindowsFeature: Installs a Windows Server role or feature, such as Microsoft Defender Antivirus after someone removed it.Invoke-CimMethod: Runs a method, an action a WMI object offers, such as SetTcpipNetbios, which can turn NetBIOS off on a network adapter.ipconfig: Shows each network adapter's IP address, subnet mask, and default gateway; with options it shows full details, renews a DHCP address, or clears the DNS cache.kill: Ends a running process; in PowerShell on Windows, kill is an alias for Stop-Process.klist: Lists the Kerberos tickets cached for your sign-in session, with each ticket's service, expiry, and encryption type, such as AES-256 or RC4.ls: Lists files and folders; in PowerShell on Windows, ls is an alias for Get-ChildItem.lusrmgr.msc: Opens Local Users and Groups, a window for viewing, creating, disabling, and editing local accounts and group memberships.manage-bde: Shows and manages BitLocker drive encryption from Command Prompt; manage-bde -status reports each drive's encryption, protection, and key protectors.md: Creates a new folder, along with any missing parent folders; md is the short name of mkdir.Measure-Object: Counts the objects coming down the pipeline, and can add up, average, or find the largest and smallest values of a property.mkdir: Creates a new folder, along with any missing parent folders, such as C:\Backup before you save registry or policy backups there.more: Shows long output one screen at a time; press Space for the next page, Enter for the next line, and Q to quit.ms-settings:windowsupdate: Opens Settings at the Windows Update page, where you check for, download, and install updates.msinfo32: Opens System Information, a full report on the PC: Windows edition, BIOS mode, Secure Boot state, hardware, drivers, and running services.mstsc: Opens Remote Desktop Connection, the Windows program that signs you in to another computer's desktop over RDP.net accounts: Shows or sets this computer's password and lockout policy: minimum length, age, history, and lockout; on a domain, Group Policy overrides it.net group: Lists the domain's global groups, or shows and changes a group's members, such as who is in Domain Admins.net help: Lists the net subcommands, or with a name explains one of them.net localgroup: Lists local groups, shows a group's members, or adds and removes members, for example to audit or trim the Administrators group.net session: Lists the computers connected to this computer's shared folders right now, or disconnects one.net share: Lists the folders this computer shares on the network, or removes a share.net start: Lists the services running right now, or starts one by name.net stop: Stops a running service by name.net user: Lists local user accounts, shows one account's details, or creates, deletes, disables, and sets passwords for accounts.netplwiz: Opens the classic User Accounts window, where you see each local account and its group, make an account a standard user or an administrator, and reset a password.netsh advfirewall firewall: Shows, adds, changes, or deletes individual Windows Defender Firewall rules from the command line.netsh advfirewall set: Turns Windows Defender Firewall on or off per profile and sets the default action for traffic no rule matches.netsh advfirewall show: Shows the Windows Defender Firewall state and settings for each profile, including whether it is on and its inbound and outbound defaults.netsh http show: Shows what HTTP.sys, the Windows web listener behind IIS and WinRM, serves: each web address and the process that owns it, which port lists show as System (PID 4).netstat: Lists network connections and listening ports, and with options shows the process id or program behind each one.New-ADGroup: Creates a group in Active Directory, such as a department group the brief lists, so you can then add its members with Add-ADGroupMember.New-ADUser: Creates a user account in Active Directory, the domain's directory, such as a new staff member the brief lists.New-Item: Creates a new file, folder, or registry key; hardening steps use it to create a policy key before Set-ItemProperty writes a value into it.New-ItemProperty: Creates a registry value with the type you choose, or with -Force overwrites one that exists; it is the PowerShell twin of reg add.New-LocalGroup: Creates a local group, such as one the brief lists for a team, so you can then add its members with Add-LocalGroupMember.New-LocalUser: Creates a local user account; without -Password or -NoPassword it prompts for the password securely.New-NetFirewallRule: Creates a Windows Defender Firewall rule that allows or blocks traffic, such as one port the brief requires, from just the addresses that need it.New-Object: Creates a .NET or COM object in PowerShell, such as the Windows Update agent object whose Results show when updates were last checked and installed.notepad: Opens Notepad, the built-in text editor, optionally with a file; run it as administrator to edit system files such as the hosts file.nslookup: Asks a DNS server for the address behind a name, or other records such as mail servers, and shows which server answered.optionalfeatures: Opens the Windows Features window, where you turn optional features such as Telnet Client, SMB 1.0, IIS, and FTP on or off.Out-File: Saves a command's output to a text file, exactly as it would print on screen, for your notes or evidence.Out-Host: Sends output straight to the screen; with -Paging it shows one screenful at a time, like more.Out-Null: Discards whatever is piped into it, so a step such as creating a registry key runs without printing anything.Out-String: Turns a command's output into plain text, as it would print on screen, so text tools such as Select-String can search the formatted lines.ping: Sends small test messages to an address or name and reports whether replies come back and how long they take.powercfg: Shows or changes power plan settings; hardening uses it to require a password when the computer wakes from sleep.powershell: Starts Windows PowerShell; in an investigation, flags such as -EncodedCommand, -ExecutionPolicy Bypass, or -WindowStyle Hidden in a command line signal an attacker.ps: Lists running processes; in PowerShell on Windows, ps is an alias for Get-Process.pwd: Prints the current folder; in PowerShell, pwd is an alias for Get-Location.query: Shows sessions on this computer; query user lists who is signed in, with each session's state, idle time, and sign-in time.quser: Lists the users signed in to this computer, with each session's name, state, idle time, and sign-in time.rd: Deletes a folder; with /s it deletes everything inside too, which removes a folder of prohibited media in one step.Read-Host: Asks you to type a value while a command runs, so the answer stays out of command history; with -AsSecureString it also hides a password as you type.reg add: Creates or changes a registry value from the command line, used to switch security settings such as UAC, Remote Desktop, or NTLM level.reg delete: Deletes a registry value, or a whole key with everything under it, from the command line.reg export: Saves a registry key and its values to a .reg file, a backup to make before you change anything with reg add or reg delete.reg import: Writes the keys and values saved in a .reg file back into the registry, which undoes a change made after reg export took the backup.reg query: Reads registry keys and values from the command line, such as UAC, Remote Desktop, or SMBv1 settings.Remove-ADGroupMember: Removes an account from an Active Directory group, such as taking an unauthorized user out of Domain Admins.Remove-ADUser: Deletes a domain account from Active Directory.Remove-AppxPackage: Uninstalls a Microsoft Store app package, such as a game or a remote-access app the brief rules out, for one user or every user.Remove-Item: Deletes files, folders, or registry keys; deleted files skip the Recycle Bin.Remove-ItemProperty: Deletes one value from a registry key, such as a planted entry in a Run key that starts malware at sign-in.Remove-LocalGroupMember: Removes a user or group from a local group, such as taking away administrator rights from an account that should be a standard user.Remove-LocalUser: Deletes a local user account.Remove-MpPreference: Removes entries from Microsoft Defender's lists, most often an exclusion an attacker added to hide a folder or program.Remove-NetFirewallRule: Deletes a Windows Defender Firewall rule, such as one an attacker added to open a port.Remove-Service: Deletes a service from Windows, so it leaves the service list for good; the program file it ran stays on disk.Remove-SmbShare: Stops sharing a folder over the network; the folder and its files stay on disk.Remove-WindowsCapability: Uninstalls a Windows capability, such as OpenSSH Server, which removes a remote-access door.Remove-WindowsFeature: Removes a Windows Server role or feature; Remove-WindowsFeature is the older name of Uninstall-WindowsFeature and takes the same options.Rename-LocalUser: Changes a local account's name; the account keeps its SID, password, and group memberships, so a renamed Administrator still ends in -500.Resolve-DnsName: Looks up a name in DNS and returns its records, such as its IP address or mail servers.Restart-Computer: Restarts the computer.Restart-Service: Stops and then starts a service, which makes it reload its settings.Restore-VMCheckpoint: Returns a Hyper-V virtual machine to a checkpoint saved earlier with Checkpoint-VM, which undoes every change made since.Resume-BitLocker: Turns BitLocker protection back on for a drive after it was suspended, for example for a firmware or BIOS update.Revoke-SmbShareAccess: Removes a user's or group's access to a network share, such as taking Everyone off a share meant for one team.ri: Deletes files or folders; ri is PowerShell's short alias for Remove-Item.rm: Deletes files or folders; in PowerShell on Windows, rm is an alias for Remove-Item.rmdir: Deletes a folder; in Command Prompt it removes an empty folder (or a whole tree with /s), and in PowerShell it is an alias for Remove-Item.route: Shows this computer's routing table: which gateway and interface traffic to each network leaves through.runas: Runs a program as a different account; with /netonly the program keeps your identity locally and uses the other account only for network access.sasv: Starts a service; sasv is PowerShell's short alias for Start-Service.sc config: Changes a service's settings, most often its start type, such as disabled for an unneeded or planted service.sc delete: Removes a service's registration from Windows, so a planted service is gone for good once it stops.sc qc: Shows a service's configuration: its start type, program path, and the account it runs as, which reveals planted or hijackable services.sc qtriggerinfo: Shows the trigger events that start or stop a service, such as a device arriving or a network request; a trigger can start a Manual service by itself.sc query: Shows whether services are running or stopped; alone it lists the active services.sc start: Starts a service.sc stop: Stops a running service.schtasks: Lists, runs, disables, and deletes scheduled tasks, the programs Windows starts on a schedule or at sign-in, where attackers often hide persistence.sconfig: Opens Server Configuration, a numbered text menu on Windows Server for the computer name, domain, network, Remote Desktop, and Windows Update.Search-ADAccount: Finds domain accounts in a risky or notable state: inactive, locked out, disabled, expired, or with passwords that never expire.secedit: Exports, applies, or compares a security template, one text file of password, lockout, user-rights, and security-option settings; it is the command-line route to password complexity.secpol.msc: Opens Local Security Policy, where you set password and lockout rules, audit policy, user rights, and security options in one window.Select-Object: Keeps only the properties (columns) you name from each object in the pipeline, or only the first or last few objects.Select-String: Searches inside text files, or text sent down the pipeline, for lines that match a word or pattern.servermanager: Opens Server Manager, the Windows Server dashboard where you add or remove roles and features and see each role's events and services.services.msc: Opens the Services window, where you see every service and change its status, start type, and the account it runs as.Set-ADAccountControl: Changes an account's security flags in Active Directory, such as requiring Kerberos pre-authentication or requiring a password.Set-ADAccountPassword: Sets a new password on a domain account; with -Reset an administrator replaces it without knowing the old one.Set-ADDefaultDomainPasswordPolicy: Changes the domain-wide password and lockout policy, such as the lockout threshold, lockout duration, and minimum password length.Set-ADUser: Changes a domain account's settings, such as forcing a new password at next sign-in or making its password follow expiry.Set-Content: Replaces a file's contents with the text you give, creating the file when it is missing; in Windows PowerShell 5.1, sc is its alias.Set-DnsServerPrimaryZone: Changes a DNS zone's settings, such as allowing only secure dynamic updates and turning off zone transfers to unknown servers.Set-ExecutionPolicy: Changes PowerShell's script execution policy, for example to RemoteSigned so your own scripts run while downloaded ones must be signed.Set-ItemProperty: Writes a value into a registry key, which is how many hardening steps change Windows settings such as UAC, Remote Desktop, or credential protection.Set-LocalUser: Changes a local account's settings, such as its password, whether the password expires, its full name, or its description.Set-Location: Changes PowerShell's current location to a folder or another drive, including registry drives such as HKLM:.Set-MpPreference: Changes Microsoft Defender's settings, such as turning real-time protection on or switching on PUA blocking, cloud protection, and controlled folder access.Set-NetFirewallProfile: Turns Windows Defender Firewall on or off for each profile and sets what happens to traffic that matches no rule.Set-NetFirewallRule: Changes an existing Windows Defender Firewall rule, for example so Remote Desktop accepts connections only from the admin subnet.Set-Service: Changes a service's start type, for example to Disabled so an unneeded service stays off after a restart.Set-SmbClientConfiguration: Changes this computer's SMB client settings, such as requiring signing when it connects to file servers.Set-SmbServerConfiguration: Changes this computer's SMB file-sharing server settings, such as turning SMBv1 off or requiring signing and encryption.Set-WebConfigurationProperty: Changes an IIS configuration setting, such as turning off directory browsing, which hides a site's file list from visitors.shell:common startup: Opens the all-users Startup folder, whose shortcuts and files run when anyone signs in.shell:startup: Opens your own Startup folder, which holds shortcuts and files that run every time you sign in.shutdown: Shuts down, restarts, or signs out of the computer, now or after a delay, and can cancel a pending shutdown.sigcheck: Shows whether a file is digitally signed, who signed it, and its hashes, so an unsigned program among signed Windows files stands out; it is a separate free download.sl: Changes the current location; sl is PowerShell's short alias for Set-Location.Sort-Object: Puts the objects in the pipeline in order by a property, such as names alphabetically or updates newest first.spps: Ends a running process; spps is PowerShell's short alias for Stop-Process.spsv: Stops a service; spsv is PowerShell's short alias for Stop-Service.ssh: Opens an encrypted remote session on another device, such as a switch or server, using the OpenSSH client built into Windows.start: Opens a program, file, folder, or web address in its own window; start alone opens a new Command Prompt window.Start-MpScan: Starts a Microsoft Defender malware scan: quick, full, or of one folder.Start-Process: Starts a program or opens a file from PowerShell; with -Verb RunAs it opens the program as administrator after a UAC prompt.Start-Service: Starts a stopped Windows service.Stop-Computer: Shuts the computer down.Stop-Process: Ends a running process by its id or name; disable the service or task that starts it first, or it comes back.Stop-Service: Stops a running Windows service until it is started again or the computer restarts.streams: Lists the alternate data streams hidden on a file or under a folder, such as a Zone.Identifier download mark or a stream hiding a payload, and can delete them.Suspend-BitLocker: Pauses BitLocker protection on a drive, with the data still encrypted, so a firmware update can finish without the recovery key; Resume-BitLocker turns it back on.sysdm.cpl: Opens System Properties, where you see the computer's name and domain and reach the Remote, Advanced, and System Protection tabs.systeminfo: Prints a summary of the computer: Windows edition and build, install date, last boot time, domain, installed updates, and network cards.SystemPropertiesRemote: Opens System Properties on the Remote tab, where you turn Remote Assistance and Remote Desktop on or off and require Network Level Authentication.tar: Lists or unpacks the files inside an archive; with -tf it shows what a .zip holds and leaves every file packed.taskkill: Ends a running process by its process id or program name.tasklist: Lists running processes with their process ids and memory use, and can show the services each process hosts.taskschd.msc: Opens Task Scheduler, the window that shows every task set to run on a schedule or at sign-in, with its triggers and actions.tcpvcon: Lists every TCP and UDP endpoint with the process that owns it, so you match a connection or a listening port to the program behind it.telnet: Opens an unencrypted remote session or tests whether a TCP port answers; Windows 11 includes the Telnet Client as an optional feature that is off by default.Test-NetConnection: Tests whether a host answers and whether a TCP port on it accepts connections, which works even when ping is blocked.Test-Path: Answers True or False: does this file, folder, or registry key exist, so a step creates a policy key only when it is missing.time: Shows the current time and asks for a new one; press Enter to keep it.tpm.msc: Opens TPM Management, which shows the TPM chip's status and its specification version (Windows 11 needs 2.0).tracert: Lists each router on the path to a destination, which shows where traffic stops along the way.type: Prints the text inside a file; in PowerShell, type is an alias for Get-Content.Unblock-File: Removes the Mark of the Web from a downloaded file, which lifts the warnings and script blocks Windows applies to internet files.Uninstall-WindowsFeature: Removes a Windows Server role or feature, such as the FTP server, SMBv1, or the Telnet Client, which shrinks the attack surface.Unlock-ADAccount: Unlocks a domain account that the lockout policy locked after too many failed sign-ins.Unregister-ScheduledTask: Deletes a scheduled task.Update-Help: Downloads the newest full help text for the PowerShell modules on this computer, so Get-Help shows complete descriptions and examples.Update-MpSignature: Downloads the newest Microsoft Defender signatures, so it recognizes the latest malware.UserAccountControlSettings: Opens the User Account Control slider, where Always notify is the top position and the default sits one step below it.ver: Prints the Windows version and build number; Windows 11 still reports itself as version 10.0 with a build of 22000 or higher.w32tm: Shows and configures the Windows Time service, which keeps the clock in sync; domain sign-in fails when clocks drift more than five minutes apart.wbadmin: Makes and manages built-in Windows image backups, including everything needed to restore the whole machine onto a blank disk.wevtutil epl: Exports an event log to an .evtx file, so you can save evidence before it is overwritten and open it on another machine.wevtutil gl: Shows an event log's settings: whether it is on, where its file lives, its maximum size in bytes, and what happens when it fills.wevtutil sl: Changes an event log's settings, such as its maximum size, or turns on a log that ships switched off, such as Task Scheduler history.wf.msc: Opens Windows Defender Firewall with Advanced Security, the window for profiles, inbound and outbound rules, and firewall logging.Where-Object: Keeps only the objects in the pipeline that pass a test, such as accounts whose Enabled property is True.whoami: Shows which account you are using right now, and with options lists your groups, privileges, and security identifier (SID).windowsdefender:: Opens the Windows Security app, where you check virus and threat protection, the firewall, and device security.winget list: Lists the apps installed on this computer, including desktop programs and Store apps, with their versions.winget uninstall: Removes an installed app by name or id, such as a hacking tool or game the brief leaves out.winget upgrade: Lists the apps with a newer version available, or updates one app or every app, including desktop programs such as browsers.winrm: Shows or changes the settings of WinRM, the service behind PowerShell remoting, such as whether it accepts Basic sign-in or unencrypted traffic.winver: Opens the About Windows box, which shows the edition, the version (such as 24H2), and the OS build number.Write-Output: Sends text or objects down the pipeline, which prints them on screen when nothing else receives them; scripts use it to report results.wt: Opens Windows Terminal, the Windows 11 app that holds PowerShell, Command Prompt, and other shells in tabs../audit_users.sh: Runs the lesson's own Bash audit script from the current folder, which lists the human accounts and flags any name the scenario brief leaves out../set_aging.sh: The example script from the Defense Ladder's scripting unit: it backs up /etc/login.defs, sets each password-aging key with sed, and greps each one as proof.a2disconf: Turns off an Apache settings file by removing its link from conf-enabled; reload Apache to apply it.a2enconf: Turns on an Apache settings file by linking it from conf-available into conf-enabled; reload Apache to apply it.a2query: Reports whether an Apache module, settings file, or site is turned on.aa-audit: Switches an AppArmor profile to audit mode, which keeps enforcing it and also logs every access the profile allows.aa-complain: Switches an AppArmor profile to complain mode, so the program runs freely while the log records each action the profile would block.aa-disable: Turns an AppArmor profile off: unloads it now and links it into /etc/apparmor.d/disable, so it stays off after a reboot.aa-enforce: Switches an AppArmor profile to enforce mode, so the program it covers is blocked from anything the profile leaves out.aa-logprof: Reads AppArmor's logged denials and complain-mode events and offers new profile rules for each, one question at a time.aa-status: Shows whether AppArmor is on, how many profiles are loaded, which are in enforce or complain mode, and which running processes they confine.aa-unconfined: Lists processes with open network ports and marks each one confined by an AppArmor profile or unconfined, which shows the services worth confining first.add-apt-repository: Adds a software repository or PPA to apt's sources, or takes one away with --remove.addgroup: Creates a new group with Debian's friendlier front end to groupadd; adduser or gpasswd then adds its members.adduser: Creates a user with a home folder and asks for a password and details; with two names, adds an existing user to a group.aide: Compares every watched file against the AIDE database and lists each file added, removed, or changed since the database was built.aideinit: Builds the first AIDE database: a known-good record of file hashes that later checks compare against, so build it after hardening.alias: Lists the shell's command shortcuts, or makes a new one that runs a longer command when you type a short name.apache2ctl: Controls the Apache web server; configtest checks every settings file for mistakes before you reload.apachectl: Another name for apache2ctl; configtest checks Apache's settings before you reload the web server.apparmor_status: Another name for aa-status: shows whether AppArmor is on, how many profiles are loaded, which mode each uses, and which processes they confine.apt autoclean: Deletes downloaded package files that can no longer be downloaded, such as old versions, freeing disk space.apt autopurge: Removes packages that were installed only as dependencies and are now unused, along with their configuration files.apt autoremove: Removes packages that were installed only as dependencies and are now unused.apt clean: Empties apt's download cache in /var/cache/apt/archives, freeing disk space.apt dist-upgrade: Upgrades every package and adds or removes packages when needed to finish; the older name for apt full-upgrade.apt full-upgrade: Upgrades every package and adds or removes packages when needed to finish the upgrade.apt install: Downloads and installs packages, and anything they need, from the system's trusted repositories.apt list: Lists packages: everything installed, everything with a newer version waiting, or the names matching a pattern.apt policy: Lists every repository apt uses with its priority; with a package name, shows the installed and candidate versions and where each comes from.apt purge: Removes packages along with their system-wide configuration files.apt reinstall: Installs the same version of a package again, putting back its original program files; edited configuration files stay as they are.apt remove: Uninstalls packages but keeps their system-wide configuration files.apt search: Searches package names and descriptions in the repositories for a word or pattern.apt show: Shows a package's details: version, size, dependencies, source, and description.apt update: Downloads fresh package lists from every repository, so apt knows the newest versions; it installs nothing.apt upgrade: Installs the newer version of every installed package, the kernel included, keeping all packages already present.apt-cache: Reads apt's package lists: searches them, shows one package's details, or shows its version and source.apt-config: Prints the apt settings in force after every file in /etc/apt/apt.conf.d is read, so a later file that turns automatic updates off shows up.apt-get autoclean: Deletes cached package files whose versions have left the repositories, such as old versions, freeing disk space; the apt-get form that scripts use.apt-get autopurge: Removes packages that were installed only as dependencies and are now unused, along with their configuration files; the same as apt-get autoremove --purge.apt-get autoremove: Removes packages that were installed only as dependencies and are now unused; the apt-get form that scripts use.apt-get clean: Empties apt's download cache in /var/cache/apt/archives, freeing disk space; the apt-get form that scripts use.apt-get dist-upgrade: Upgrades every package and adds or removes packages when needed to finish, such as a new kernel; apt-get full-upgrade is the same command.apt-get full-upgrade: Upgrades every package and adds or removes packages when needed to finish; the same as apt-get dist-upgrade.apt-get install: Installs packages from the trusted repositories; the older apt-get form that scripts use.apt-get purge: Removes packages along with their system-wide configuration files; the apt-get form that scripts use.apt-get reinstall: Installs the same version of a package again, putting back its original program files; the same as apt-get install --reinstall.apt-get remove: Uninstalls packages but keeps their system-wide configuration files; the apt-get form that scripts use.apt-get update: Downloads fresh package lists from every repository so apt knows the newest versions, and leaves installing to upgrade; the apt-get form that scripts use.apt-get upgrade: Installs newer versions of the installed packages and holds back any upgrade that needs a new package, such as a new kernel; dist-upgrade installs those.apt-mark: Marks packages as held, so updates skip them, or as installed by hand or automatically, and lists each group.arp: Shows the ARP cache: the IP addresses on your local network and the MAC addresses they answered with.at: Runs commands once at a set time; at -l, -c, and -d list, print, and delete the waiting jobs, where a planted one-time task can hide.atq: Lists one-time jobs queued with at, with job numbers and run times (sudo shows every user's); on stock Ubuntu, which ships without at, command not found means no jobs exist.atrm: Deletes a queued at job by its job number.audit2allow: Turns SELinux denials from the audit log into allow rules you can review and load; the SELinux partner of aa-logprof.auditctl: Controls the kernel's audit system: lists the loaded rules, shows its status, and adds a watch that logs who touches a file.augenrules: Merges the rule files in /etc/audit/rules.d into /etc/audit/audit.rules; with --load it also loads them into the kernel.aureport: Builds summary reports from the audit log, such as which programs ran, sign-ins, and authentication attempts.ausearch: Searches the audit log for events by rule key, message type, or user, answering questions like who changed /etc/passwd and when.awk: Splits each line into fields and prints or tests them, such as listing every account whose user ID is 0.base64: Encodes text or a file as base64, or with -d decodes base64 back to the original, which unmasks hidden commands.bash: Starts the Bash shell or runs a script file with it, which works even where the file lacks execute permission.batch: Queues commands to run once the system is less busy, through the same atd service as at; atq lists the waiting jobs.builtin: Runs the shell's own built-in version of a command, skipping any function or alias with the same name.cat: Prints a file's whole contents to the screen, or joins several files into one stream.cd: Changes the folder you are working in.chage: Shows or sets one account's password aging: how long a password lasts, how soon it can change, the warning, and expiry.chattr: Sets or clears special file attributes, such as immutable, which blocks every change to a file, even by root.chgrp: Changes which group owns a file or folder.chkrootkit: Scans for signs of known rootkits, such as replaced system programs and hidden files.chmod: Changes who can read, write, or run a file, with numbers such as 640 or symbols such as g-w or u-s.chown: Changes the user and group that own a file or folder, such as root:shadow for /etc/shadow.chpasswd: Sets passwords for many accounts at once from lines of user:password typed or piped in.chronyc: Shows how closely the clock follows its time servers when chrony is the time service; Ubuntu 24.04 and Mint 22 use timesyncd until you install chrony.clamscan: Scans files and folders for known malware with ClamAV's signatures.clear: Clears the terminal screen.cmp: Compares two files byte by byte and names the first byte and line that differ, staying silent when they match.comm: Compares two sorted lists line by line and shows the lines only in the first, only in the second, or in both.command: Runs a program while skipping any shell function or alias of that name; command -v prints what a name runs.cp: Copies files or folders; with -a it keeps owner, mode, and times, which makes a safe backup before an edit.crontab: Lists, edits, or removes a user's scheduled cron jobs; with sudo it handles root's or another user's.curl: Sends a web request and prints or saves the answer; -sI shows only the response headers.cut: Keeps chosen fields or characters from each line, such as the name and UID columns of /etc/passwd.date: Prints the current date and time, in any format you choose.dd: Copies raw data block by block, such as imaging a whole evidence disk into a file.debsums: Checks installed package files against the hashes their packages shipped with and lists any that changed.delgroup: Deletes a group; with --only-if-empty it deletes the group only when no user still belongs to it.deluser: Deletes a user account, or with a user and a group, removes that user from the group, such as sudo.df: Shows each mounted disk's size, used space, and free space.diff: Compares two files line by line and prints only what differs, so you can prove exactly what an edit changed.dig: Asks a DNS server a question and shows the full answer, such as a name's address or an address's name.dir: Lists a folder's contents in columns, like ls.dmesg: Prints the kernel's message buffer: hardware events, driver messages, and crashes such as repeated segfaults.docker: Manages containers; docker inspect prints a container's full settings, such as whether it runs privileged, as root, or with host folders mounted.dpkg: The low-level package tool: lists installed packages, names the package that owns a file, and shows a package's files and status.dpkg-query: Reads the installed-package database, such as listing every installed package with its version.dpkg-reconfigure: Asks an installed package's setup questions again, such as turning automatic security updates on for unattended-upgrades.echo: Prints text, with variables filled in; scripts use it for messages and to feed text into other commands.egrep: The old name for grep -E (extended patterns); current grep still runs it but prints a warning to use grep -E.env: Prints every environment variable, or runs a command with changed variables.exit: Closes the current shell, ending a root shell, an SSH session, or the terminal.export: Sets a shell variable and passes it to every program started from this shell.faillock: Shows an account's recent failed sign-ins counted by pam_faillock, or resets the count to unlock it.false: Does nothing and ends with exit code 1 (failure); /bin/false as a login shell blocks sign-in.fgrep: The old name for grep -F (fixed text, no patterns); current grep still runs it but prints a warning to use grep -F.file: Names a file's real type by reading its first bytes, whatever its extension claims.find: Searches folders for files by name, type, permissions, owner, or date, and can run a command on each one it finds.findmnt: Shows mounted filesystems as a tree with their mount options, such as whether /tmp has noexec.flatpak info: Shows the details of one installed Flatpak app or runtime, such as its version, origin remote, installed size, and runtime.flatpak install: Installs an app, and the runtime it needs, from a Flatpak remote such as flathub.flatpak list: Lists the apps and runtimes installed through Flatpak, which apt list leaves out.flatpak remotes: Lists the repositories (remotes) Flatpak installs from, such as flathub.flatpak remove: Another name for flatpak uninstall: removes an app installed through Flatpak, by its application ID.flatpak uninstall: Removes an app installed through Flatpak, by its application ID.flatpak update: Updates every installed Flatpak app and runtime, which apt upgrade leaves out.for: Repeats commands once for each item in a list, such as every account name in /etc/passwd.free: Shows how much memory and swap is in use and how much is free.freshclam: Downloads the newest ClamAV malware signatures.fuser: Names the processes that use a file, a folder, or a network port, and can end them.gawk: GNU awk: splits each line into fields and prints or tests them, running the same programs as awk plus extra built-in functions.gedit: Opens a file in gedit, a windowed text editor with menus and mouse support.getcap: Lists files that carry Linux capabilities, a piece of root power such as binding low ports or reading any file.getenforce: Prints SELinux's mode: Enforcing, Permissive, or Disabled; Ubuntu and Mint use AppArmor instead.getent: Looks up entries in the system's account databases, such as who belongs to the sudo group or one account's line.getfacl: Lists a file's access control list: the extra user and group permissions a + after the mode hints at.gnome-text-editor: Opens a file in GNOME's graphical text editor.gpasswd: Manages one group's members: adds a user, removes a user, or sets the whole member list.grep: Prints the lines of files or command output that match a pattern, such as every failed password in auth.log.groupadd: Creates a new group.groupdel: Deletes a group.groups: Lists the groups a user belongs to.grub-mkconfig: Builds the boot menu file from /etc/default/grub and the scripts in /etc/grub.d; update-grub runs it with -o /boot/grub/grub.cfg.grub-mkpasswd-pbkdf2: Turns a password you type into a PBKDF2 hash for the GRUB boot menu's superuser setting.gsettings: Reads or changes desktop settings for the current user, such as turning on the screen lock and the idle delay.gufw: Opens the graphical settings for the ufw firewall, where you turn it on and set Incoming to Deny and Outgoing to Allow.hash: Lists or clears the shell's memory of where each command's program lives.head: Prints the first lines of a file or of command output, ten unless you choose.help: Lists Bash's built-in commands, or explains one, such as help cd.history: Lists the commands typed in this shell, numbered, which makes a handy change log.host: Looks up a name's addresses, or an address's name, in DNS and prints a short answer.hostname: Prints the machine's name, or its IP addresses with -I.hostnamectl hostname: Prints the machine's name, or with a name sets it permanently.hostnamectl set-hostname: Sets the machine's name permanently.iconv: Converts text from one character encoding to another, such as decoding UTF-16LE text from an encoded PowerShell command.id: Prints a user's ID number, main group, and every group they belong to.ifconfig: Shows each network interface's addresses; the older net-tools command that ip addr replaces.inotifywait: Waits for changes to files or folders and prints each event, such as CREATE, MODIFY, or DELETE, as it happens.ip addr: Shows the IP addresses on every network interface, or adds one.ip link: Lists the network interfaces with their state (UP or DOWN) and MAC addresses.ip neigh: Shows the neighbor (ARP) cache: local IP addresses, their MAC addresses, and whether each is REACHABLE or STALE.ip route: Shows the routing table: the default gateway and which interface each network is reached through.ip6tables: Lists the kernel's IPv6 firewall rules, the half of the stack ufw leaves open when its IPv6 setting is off.iptables: Lists the firewall rules actually loaded in the kernel, including ones in /etc/ufw/before.rules that ufw status leaves out.journalctl: Reads the systemd journal: every service's log messages, filtered by service, time, boot, or priority.jq: Reads JSON and prints the fields you ask for, such as every IP address with 20 or more failures.kill: Sends a signal to a process by its ID number, normally to end it.killall: Ends every process with an exact program name.last: Lists recent sign-ins and reboots, newest first, with where each came from and how long it lasted.lastb: Lists recent failed sign-in attempts, newest first.lastlog: Lists every account with the time and place of its most recent sign-in, or Never logged in.ldd: Lists the shared libraries a program asks for and where the loader finds each one.less: Shows a file one screen at a time, so you can scroll and search it without running or changing anything; q quits.lightdm: The LightDM sign-in screen (display manager) program; its guest and auto-login settings live in /etc/lightdm.ln: Makes a link: a second name for a file, or with -s a shortcut that leads to a path.locate: Finds files by name in seconds by searching an index that updatedb builds, rather than the disk itself; the index leaves out /tmp, /var/spool, /media, and memory filesystems such as /dev/shm.logger: Writes a message into the system log, so a script's results land somewhere trusted.loginctl disable-linger: Turns off lingering for a user, so systemd stops that user's own service manager and its services once their last session ends.loginctl enable-linger: Turns on lingering for a user, so their own systemd services start at boot and keep running after they sign out; disable-linger turns it back off.loginctl kill-user: Sends a signal to every process of one user, ending them all by default; terminate-user also closes the user's sessions.loginctl list-sessions: Lists the open sign-in sessions with their session ID, user, seat, and terminal; bare loginctl prints the same list.loginctl list-users: Lists the users that have a session open or lingering turned on, with their user ID and whether each one lingers.loginctl terminate-user: Ends every session of one user and the processes inside them, so a removed group or a locked account takes effect at once.logout: Ends a login shell, such as an SSH session or a console sign-in.ls: Lists a folder's contents; -l adds permissions, owner, size, and date, and -a includes hidden files.lsattr: Lists files' special attributes; an i in the list means immutable, which blocks every change, even by root.lsb_release: Prints the distribution's name, release number, and code name.lsblk: Lists disks and their partitions as a tree with sizes and mount places; -f adds filesystem types such as crypto_LUKS.lslogins: Lists every account with its UID, last sign-in, and password state; it also works where lastlog is missing.lsof: Lists open files, including network connections, with the process that holds each one.ltrace: Traces the library calls a program makes, such as inet_addr() with the address it looks up, for a running process or a command you start.lynis: Audits the system's security settings and writes warnings, suggestions, and a hardening index to /var/log/lynis-report.dat, changing nothing.man: Opens the manual page for a command, listing every option it takes; q quits and / searches.mariadb-secure-installation: Runs MariaDB's hardening wizard: sets root's sign-in, removes anonymous users and the test database, and blocks remote root sign-in.mawk: A fast version of awk, the one Ubuntu and Mint install as awk; it splits lines into fields and prints or tests them.md5sum: Prints a file's MD5 hash; fine for spotting accidental change, but SHA-256 is the choice when tampering matters.mintinstall: Linux Mint only: opens the Software Manager, which installs and removes apps, Flatpaks included, and lists what is installed.mintupdate-automation: Linux Mint only: turns automatic updates on or off, the same switch as Update Manager's Automation tab.mintupdate-cli: Linux Mint only: lists or installs the updates Update Manager offers, from the command line.mkdir: Creates a folder; -p also creates any missing parent folders.mokutil: Manages Secure Boot's Machine Owner Keys; --sb-state prints whether Secure Boot is on.more: Shows a file one screen at a time; space goes forward and q quits.mv: Moves or renames files and folders.mysql: Opens the MySQL command-line client; with -e it runs one SQL statement and exits, such as listing the database accounts.mysql_secure_installation: Runs MySQL's hardening wizard: sets root's sign-in, removes anonymous users and the test database, and blocks remote root sign-in.nano: Opens a file in the nano text editor; Ctrl+O saves, Ctrl+X exits, and Ctrl+W searches.nautilus: Opens a folder in Files, the GNOME file manager used on Ubuntu.nc: Netcat: opens a raw network connection; nc -zv tests whether a port answers.nc.openbsd: The program behind nc on Ubuntu and Mint: opens raw network connections, and nc.openbsd -zv tests whether a port answers; it takes the same options as nc.nemo: Opens a folder in Nemo, the Linux Mint file manager.netcat: Another name for nc on Ubuntu and Mint: opens raw network connections, and netcat -zv tests whether a port answers.netstat: Lists network connections and listening ports; the older net-tools command that ss replaces.nft: Manages nftables, the kernel firewall under ufw; nft list ruleset prints every rule actually loaded.nginx: The nginx web server program; nginx -t tests its settings before a reload, and nginx -T prints the whole configuration in force.nice: Starts a command at a lower (or, with sudo, higher) scheduling priority.nmap: Scans machines for open ports and the services behind them; scan only your own lab or with permission.nmcli connection: Lists and manages NetworkManager's saved connections, such as every Wi-Fi network the machine remembers.nmcli device: Lists the network devices NetworkManager sees with their type, state, and connection; nmcli device show adds each one's addresses, gateway, and DNS servers.nmcli general: Shows NetworkManager's overall state: its connection state, whether it reaches the internet (connectivity full), and whether Wi-Fi is on.nohup: Runs a command that keeps going after you sign out, writing its output to nohup.out.npm: Node.js's package manager; npm audit lists known vulnerabilities in a project's dependencies.nslookup: Asks a DNS server for a name's address or an address's name, and prints which server answered.openssl: A toolkit for certificates and encryption: x509 reads a certificate, dgst hashes a file, and s_client tests a TLS server.pam-auth-update: Rebuilds the shared PAM files in /etc/pam.d, such as common-auth, from the profiles in /usr/share/pam-configs, turning modules such as pam_faillock on or off.passwd: Changes a password, or for an administrator locks, unlocks, expires, or shows the state of any account's password.pgrep: Prints the process IDs of programs whose names match a pattern.pidof: Prints the process IDs of a program by its exact name.ping: Sends echo requests to a machine and shows whether and how fast it answers; on Linux it runs until Ctrl+C.pip-audit: Checks a Python project's installed packages against known vulnerabilities.pkill: Ends processes whose names match a pattern.plocate: The program behind locate on Ubuntu and Mint: finds files by name in the index updatedb builds; plocate and locate take the same options.pmap: Prints a process's memory map: its program, each library it loaded, the heap, and the stack, with sizes.poweroff: Shuts the system down and turns the power off.printenv: Prints every environment variable, or the value of one.printf: Prints text in a format you set, such as padded columns or a value on each line.ps: Lists running processes with their IDs, users, and commands.pstree: Draws running processes as a tree, showing which program started which.pwconv: Brings /etc/shadow in line with /etc/passwd: copies any field 2 value other than x over that account's shadow password, writes x in its place, and adds or drops shadow entries to match.pwd: Prints the full path of the folder you are in.pwscore: Rates one password, read from standard input, against the pwquality policy and prints a strength value from 0 to 100, or the rule it breaks.python3: Runs a Python script or a short Python command, such as decoding URL-encoded text or checking a JSON file.readlink: Prints the target of a link; readlink -f /proc/<PID>/exe names the program file a running process came from.realpath: Prints the full path of a file with every link and every . or .. step resolved, such as the real program behind a link.reboot: Restarts the system.resolvectl dns: Lists the DNS servers set for each network interface, or with an interface and an address, sets them until the next reconnect.resolvectl query: Resolves a name or address through systemd-resolved, the same path programs use, and names the interface and protocol that answered.resolvectl status: Shows the DNS servers and search domains the system uses, overall and for each interface.rgrep: Searches every file under a folder for a pattern; the same as grep -r.rkhunter: Rootkit Hunter: checks for known rootkit files, changed system programs, and suspicious settings.rm: Deletes files, or with -r whole folders, skipping the trash.rmdir: Deletes empty folders.rnano: Restricted nano: edits only the file named, and blocks opening others or saving under a new name.rsync: Copies files and folders, sending only what changed, which makes it good for backups.rvim: Restricted Vim: edits files but blocks running shell commands from inside the editor.sed: Edits text line by line with a script; sed -i changes a file in place, such as setting PermitRootLogin no.service: The older way to start, stop, or check a service; on Ubuntu and Mint it passes the request to systemctl.set: Turns shell options on or off; scripts use set -euo pipefail to stop at the first error or unset variable.setcap: Sets or removes Linux capabilities on a program file; setcap -r strips them, such as a planted cap_setuid that lets python3 become root.setfacl: Adds, changes, or removes extra user and group permissions in a file's access control list.sh: Runs the system's basic shell, dash on Ubuntu and Mint; sudo sh -c '<commands>' runs a whole command line, wildcards and redirects included, as root.sha1sum: Prints a file's SHA-1 hash, 40 hex characters long, or checks files against a saved list; use it when a question names SHA-1, and SHA-256 when tampering matters.sha256sum: Prints a file's SHA-256 hash, or checks files against a saved list of hashes to find any that changed.sha512sum: Prints a file's SHA-512 hash, 128 hex characters long, or checks files against a saved list of hashes.shopt: Lists or changes Bash's extra shell options.shutdown: Powers off or restarts the system now or after a delay, warning signed-in users first.sleep: Waits the given number of seconds, often between steps in a script.snap list: Lists the apps installed as snaps, which apt list leaves out.snap refresh: Updates every installed snap to its newest version now; a snap whose app is still open, such as Firefox, refuses until the app closes.snap remove: Uninstalls a snap app.snap version: Prints the versions of snap and the snapd service, plus the system release and the kernel.sort: Sorts lines alphabetically or by number; sort | uniq -c | sort -rn ranks repeats, busiest first.source: Runs a file's commands in the current shell, such as reloading ~/.bashrc after an edit.ss: Lists network sockets: which ports are listening, which connections are open, and with sudo, which program owns each.ssh: Signs in to another machine's shell over an encrypted connection.ssh-copy-id: Adds your public key to a remote account's authorized_keys, so you can sign in with the key.ssh-keygen: Makes an SSH key pair, or reads a key's fingerprint.sshd: The SSH server program; sshd -t checks sshd_config for mistakes and sshd -T prints the settings actually in force.stat: Shows a file's full details: size, permissions, owner, and its access, modify, change, and birth times.strace: Traces the system calls a program makes, such as each file it opens and each address it connects to, for a running process or a command you start.strings: Prints the readable text hidden in a binary file, such as names, addresses, and commands inside a program or document.su: Switches to another account, root by default, after that account's password.sudo: Runs a command as root or another user after asking your own password; sudo -l lists what an account may run, exposing broad rules such as NOPASSWD: ALL.sudoedit: Edits a protected file safely: you edit a copy as yourself and sudo writes it back, so a sudoers rule can allow one file only.sysctl: Reads or changes kernel settings while the system runs, such as turning off IP forwarding or loading hardening files.systemctl cat: Prints a service's unit file plus every drop-in override, which can quietly replace the program it runs.systemctl daemon-reexec: Restarts systemd itself in place, keeping every service running; used after systemd is upgraded.systemctl daemon-reload: Rereads every unit file after you add, edit, or delete one, so systemd uses the current versions.systemctl disable: Stops a service from starting at boot; with --now it also stops it right away.systemctl edit: Opens an override file for a service, so you can add settings such as sandboxing without changing the original unit.systemctl enable: Sets a service to start at every boot; with --now it also starts it right away.systemctl halt: Stops the operating system and leaves the machine on at a halted screen.systemctl is-active: Prints one word for a service: active when it runs now, otherwise inactive or failed.systemctl is-enabled: Prints whether a service starts at boot: enabled, disabled, masked, or static.systemctl is-failed: Prints whether a service has failed: failed, or its current state.systemctl list-sockets: Lists the sockets systemd listens on for other units, with the address and the service each one starts, such as ssh.socket on port 22.systemctl list-timers: Lists systemd timers, the second scheduler beside cron, with when each last ran and runs next.systemctl list-unit-files: Lists every installed unit with its boot setting, such as every service set to start at boot.systemctl list-units: Lists the units systemd has loaded with their state, such as every service running now.systemctl mask: Blocks a unit from starting at all, even by hand or as another unit's dependency, by linking it to /dev/null.systemctl poweroff: Shuts the system down and turns the power off.systemctl reboot: Restarts the system.systemctl reload: Tells a running service to reread its settings while it keeps running, so open sessions stay connected.systemctl reload-or-restart: Reloads a service's settings when it supports that, and otherwise restarts it.systemctl restart: Stops and starts a service, so it runs with its current settings.systemctl start: Starts a service now; it changes nothing about boot.systemctl status: Shows a service's state, whether it starts at boot, its unit file, its main process, and its latest log lines.systemctl stop: Stops a service now; it may start again at boot unless you also disable it.systemctl try-restart: Restarts a service only if it is already running.systemctl unmask: Removes a mask, so the unit can be started and enabled again.systemd-analyze: Analyzes systemd; systemd-analyze security rates how exposed a service is, from 10 (unrestricted) down toward 0 (tightly sandboxed).systemd-cryptenroll: Adds a way to unlock an encrypted LUKS disk, such as a TPM chip, so an unattended reboot unlocks it.tail: Prints the last lines of a file, ten unless you choose; -f keeps printing new lines as a log grows.tar: Packs files into a .tar archive or unpacks one; tar -tvf lists the contents without unpacking.tcpdump: Captures network packets and prints them, or saves them to a .pcap file that packet viewers open.tee: Copies its input to the screen and into a file; sudo tee writes a file only root can write.test: Checks a condition, such as whether a file exists or two strings match, and sets the exit code; scripts write it as [ ].testparm: Checks Samba's smb.conf for mistakes and prints the settings Samba will actually use.time: Runs a command and then reports how long it took.timedatectl: Shows the clock, time zone, and whether the clock syncs with a time server; it can also change them.timedatectl list-timezones: Lists every time zone name the system knows, such as Pacific/Honolulu, for use with set-timezone.timedatectl set-ntp: Turns network time sync on or off, so the clock keeps matching a time server.timedatectl set-timezone: Sets the system time zone, such as Pacific/Honolulu, so clocks and log times match local time.timedatectl show: Prints the clock settings as name=value lines, such as Timezone= and NTPSynchronized=, ready for scripts and grep.timedatectl show-timesync: Prints the time sync service's settings as name=value lines, such as the time servers it was given.timedatectl status: Shows the local and UTC time, the time zone, and whether the clock is synchronized.timedatectl timesync-status: Shows the time sync service's live state: the server in use, its address, the poll interval, and how far the clock is off.timeshift: Takes or restores system snapshots, so you can roll the system back after a bad change; home folders stay out by default.top: Shows a live, updating list of processes ranked by CPU use, with memory and load; q quits.touch: Creates an empty file, or updates an existing file's timestamps.tr: Swaps, squeezes, or deletes characters, such as turning the null separators in /proc/<pid>/cmdline into spaces.traceroute: Lists each router on the path to a destination, with how long each hop takes to answer.traceroute6: Lists each router on the IPv6 path to a destination, with how long each hop takes to answer; the same as traceroute -6.true: Does nothing and ends with exit code 0 (success).type: Tells what a name runs when you type it: an alias, a shell function, a built-in, or a program file.ufw allow: Adds a firewall rule that lets traffic in to a port, service, or app, optionally only from one address.ufw default: Sets what the firewall does with traffic no rule matches, such as deny incoming and allow outgoing.ufw delete: Removes a firewall rule, by its number from ufw status numbered or by repeating the rule.ufw deny: Adds a firewall rule that silently drops traffic to a port, service, or app.ufw disable: Turns the ufw firewall off now and at boot.ufw enable: Turns the ufw firewall on now and at every boot.ufw limit: Allows a port but blocks an address that opens six or more connections in 30 seconds, slowing password guessing.ufw logging: Turns firewall logging on or off, or sets how much it records, into /var/log/ufw.log.ufw reject: Adds a firewall rule that refuses traffic and tells the sender, instead of dropping it silently.ufw reload: Reloads the firewall so edits to its rule files take effect.ufw show: Prints firewall reports, such as every rule ufw loads into the kernel, including ones from before.rules.ufw status: Shows whether the ufw firewall is active and lists its rules; verbose adds the defaults and logging level.ufw version: Prints the installed ufw version.ulimit: Shows or sets this shell's resource limits, such as open files and core dump size.umask: Shows or sets this shell's mask that decides new files' default permissions, such as 027; sign-in sessions start from UMASK in /etc/login.defs.unalias: Removes a shell alias, such as a planted one on sudo.uname: Prints system facts: the kernel name and version, the machine name, and the hardware type.unattended-upgrade: Installs pending security updates now, the same job the automatic updates run on their timer.unattended-upgrades: Another name for unattended-upgrade: installs pending security updates now.unhide: Finds hidden processes by comparing /proc and system call results with what ps prints.unhide-linux: The Linux build of unhide, which finds processes that ps leaves out; sudo unhide runs the same checks.unhide-tcp: Finds hidden network ports by trying each TCP and UDP port and reporting any in use that ss or netstat leaves out.uniq: Merges repeated neighboring lines into one; -c adds how many times each appeared, so sort first.unset: Removes a shell variable or function.unzip: Unpacks a .zip archive; unzip -l lists the files inside without unpacking anything.update-grub: Rebuilds GRUB's boot menu file from /etc/default/grub, the drop-ins in /etc/default/grub.d, and the scripts in /etc/grub.d; kernel options such as audit=1 apply at the next boot.update-rc.d: Sets whether an older-style /etc/init.d service starts at boot; on systemd systems systemctl enable and disable do this.updatedb: Rebuilds the file-name index that locate searches, so files made since the last daily update show up.updatedb.plocate: The program behind updatedb on Ubuntu and Mint: rebuilds the file-name index that locate searches, so files made since the last daily update show up.uptime: Prints how long the system has run since its last boot, how many users are signed in, and the load.useradd: Creates a user account with exactly the options you give; unlike adduser, it adds a home folder only with -m.userdel: Deletes a user account; -r also removes its home folder and mail.usermod: Changes an existing account: adds it to groups, locks or unlocks it, or changes its shell, name, or home.users: Prints the names of everyone signed in now, on one line.vdir: Lists a folder's contents in long form, like ls -l.vi: Opens a file in the vi editor: i starts typing, Esc stops, :wq saves and quits, and :q! quits without saving.vigr: Opens /etc/group in an editor and locks the file against other tools during the edit; vigr -s opens /etc/gshadow.vim: Opens a file in the Vim editor: i starts typing, Esc stops, :wq saves and quits, and :q! quits without saving.vim.tiny: A small build of Vim that Ubuntu and Mint install as vi; it edits files with the same keys.vimdiff: Opens two or more files side by side in Vim with their differences highlighted.vipw: Opens /etc/passwd in an editor and locks the file against other tools during the edit; vipw -s opens /etc/shadow.visudo: Edits the sudoers file safely: it locks the file and checks the syntax before saving, so a typo cannot break sudo.w: Shows who is signed in, from where, since when, and what each person is running now.wc: Counts the lines, words, and bytes in a file or in command output.wget: Downloads a file from a web address.which: Prints the full path of the program a command name runs, or nothing when it is absent.who: Lists who is signed in now, on which terminal, since when, and from where.whoami: Prints the name of the account you are using right now.xargs: Turns lines of input into arguments for another command, such as running a check on every file find lists.xed: Opens a file in Xed, the Linux Mint graphical text editor.xxd: Shows a file's bytes in hex beside their text, revealing its true file signature.zcat: Prints the contents of a gzip-compressed file, such as an older rotated log like auth.log.2.gz.zgrep: Searches compressed .gz files for matching lines the way grep searches plain text, such as older rotated logs like auth.log.2.gz.apachectl: Checks the Apache web server's configuration for mistakes and prints Syntax OK or the file and line with the error, so you catch errors before a restart.atq: Lists jobs waiting in the at queue to run once at a later time, with job number, time, and owner; root sees every user's jobs.awk: Splits each line of text into fields and prints or tests the ones you choose, such as finding accounts with UID 0 or an empty password field.blacklistctl: Shows the addresses blacklistd tracks or has blocked in the firewall after repeated failed sign-ins to sshd or other services; FreeBSD 15 renamed it blocklistctl and still runs the old name.blocklistctl: Shows the addresses blocklistd tracks or blocks in pf after repeated failed sign-ins to sshd or other services; FreeBSD 14 and earlier name it blacklistctl.boot: Starts FreeBSD from the boot loader prompt; boot -s opens single-user mode, a root shell before rc scripts start any services.cap_mkdb: Rebuilds the login.conf database (/etc/login.conf.db), so edits to login classes, such as password aging and login retries, take effect.cat: Prints the whole contents of one or more files to the screen, such as /etc/rc.conf, /etc/crontab, or the pkg repository files.chflags: Sets or clears BSD file flags; schg (system immutable) blocks every change, even by root, so it is FreeBSD's version of Linux chattr.chkrootkit: Scans the system for signs of known rootkits, worms, and hidden processes and prints anything suspicious; install it first with pkg install chkrootkit.chmod: Changes who can read, write, or run a file, with numbers like 600 or letters like u-s, such as making /etc/master.passwd readable by root only.chown: Changes the owner and group of files, such as making root and the wheel group own the password database files.clamscan: Scans files and folders for known viruses and malware with ClamAV and lists the infected ones; install it with pkg install clamav.crontab: Lists, edits, or removes a user's scheduled cron jobs; root can manage any user's table with -u. FreeBSD keeps these tables in /var/cron/tabs.cut: Keeps chosen fields or characters from each line, such as the member list (field 4) of a group line, or the name, UID, and shell from /etc/passwd.echo: Prints text; with >> it adds the text as a new last line of a file, such as a setting at the end of sshd_config.file: Reads the start of a file and names what it really is, such as a shell script, an ELF program, or plain text, whatever its name suggests.find: Searches folders for files that match tests, such as name, type, permissions, owner, or change date, and can run a command on each one.for: Repeats commands once for each item in a list, such as running crontab -l for every account in /etc/passwd; type sh first if your shell is csh.freebsd-update: Downloads and installs binary security patches for the FreeBSD base system and kernel, or upgrades to a new release; packages update separately with pkg.freebsd-update fetch: Downloads the security and bug-fix patches for your FreeBSD release; adding install applies them to the base system and kernel.freebsd-update IDS: Compares every base system file with the official SHA256 hashes for your release and lists files that differ, a built-in check for tampered system programs.freebsd-update install: Applies the base system and kernel patches that freebsd-update fetch downloaded on a classic install; a patched kernel runs after the next reboot.freebsd-version: Prints the FreeBSD release of the installed kernel, the running kernel, and the installed userland, which differ after a patch until you reboot.freshclam: Downloads the newest ClamAV virus signatures so clamscan recognizes recent malware.getent: Looks up entries in the system's databases, such as the wheel group's line with its members or one account's line; getent group wheel matches pw groupshow wheel.grep: Searches files or command output for lines that match a word or pattern, such as NOPASSWD in sudoers or pam_permit in PAM files.head: Prints the first lines of a file or of command output, 10 unless you say otherwise, such as the top of a process list or the newest 30 logins.id: Shows a user's ID, main group, and every group they belong to, such as whether alice is in wheel.ifconfig: Shows and sets network interfaces, such as em0 or vtnet0: addresses, up or down state, and hardware address; FreeBSD still uses it where Linux moved to ip.kill: Sends a signal to a process by its PID: the default asks it to stop politely, and -9 ends it at once without cleanup.last: Lists recent logins, logouts, reboots, and shutdowns, newest first, with user, terminal, source address, and time.lastlogin: Shows each user's most recent login time, terminal, and source address, which reveals accounts that should not have signed in.ls: Lists files and folders; -l adds permissions, owner, and size, and FreeBSD's -o adds file flags such as schg.md5: Prints the MD5 fingerprint of a file, which changes if the file changes; FreeBSD's name for md5sum, which recent releases also accept.passwd: Sets a new password for an account; anyone can change their own, and root can set any account's, including root's.pfctl: Controls pf, one of FreeBSD's built-in firewalls: checks and loads the rules in /etc/pf.conf, turns filtering on or off, and shows rules, states, tables, and counters.pkg: Installs, removes, updates, and checks third-party software packages under /usr/local; on a classic install the base system patches separately with freebsd-update.pkg audit: Compares installed packages with the FreeBSD vulnerability database and lists the ones with known security holes; -F downloads the newest list first.pkg autoremove: Removes packages that were installed only to support others and that nothing needs anymore.pkg check: Checks installed packages; -s compares every package file's checksum with the package database, so a replaced binary such as sshd or ls shows up.pkg delete: Uninstalls packages and the files they put under /usr/local, such as hacking tools or games the policy bans.pkg info: Lists installed packages with their versions and short descriptions, or shows details and files for the packages you name.pkg install: Downloads and installs a package and everything it needs from the configured repositories, such as rkhunter, clamav, or sudo.pkg remove: Uninstalls packages, such as nmap, games, or other software the policy bans; remove is another name for pkg delete, with the same options.pkg update: Downloads the latest package catalog from the repositories, so pkg knows which versions exist; it installs and changes nothing.pkg upgrade: Upgrades installed packages to the newest versions in the catalog; pkg upgrade -r FreeBSD-base patches the base system on pkgbase installs (FreeBSD 15 and later).pkg which: Names the package that installed a file, so you learn whether a program came from a package, the pkgbase base system, or nowhere known.praudit: Prints OpenBSM audit trail files, such as /var/audit/current, as readable text: who logged in, used su, or ran programs.procstat: Shows details of a running process; -b prints the full path of the program behind a PID, which exposes a backdoor hiding under an innocent name.ps: Lists running processes with their process ID, parent, owner, and full command line, which exposes reverse shells and miners.pw groupmod: Changes a group, most often its members: -m adds users and -d removes them, such as taking a standard user out of wheel, the group allowed to su to root.pw groupshow: Prints a group's line from /etc/group: name, group ID, and member list, such as who is in wheel or operator.pw lock: Locks an account by putting *LOCKED* in front of its password hash, so nobody can sign in while its files stay for the investigation.pw unlock: Unlocks an account that pw lock locked by removing *LOCKED* from its password hash, so its old password works again.pw useradd: Creates a new user account; -m makes the home directory, -G adds extra groups, and -s picks the login shell.pw userdel: Deletes a user account along with its mail spool, crontab, and at jobs; -r also removes the home directory and the files in it the user owns.pw usermod: Changes an existing account, such as its shell, groups, login class, or password expiry; -s /usr/sbin/nologin stops a service account from logging in.pw usershow: Prints an account's entry from the password database: UID, group, login class, expiry dates, home, and shell; -P labels each field, and root also sees the hash.pwd_mkdb: Rebuilds /etc/pwd.db and /etc/spwd.db, and with -p also /etc/passwd, from /etc/master.passwd after a hand edit; vipw runs it for you.rkhunter: Scans for rootkits, backdoors, and changed system programs by comparing files with a saved baseline; install it with pkg install rkhunter.rm: Deletes files, or folders with -r, such as a planted script; there is no recycle bin, so the files are gone at once.rmuser: Deletes a user account and cleans up after it: ends their processes and removes their crontab, at jobs, mail, home directory, and files in /tmp.sed: Edits text line by line with a script, such as putting each user's name in front of every line of their crontab; sed -i '' changes a file in place.service: Starts, stops, restarts, and checks FreeBSD rc.d services; service X enable writes X_enable="YES" into /etc/rc.conf through sysrc, which is how FreeBSD starts it at boot.sha256: Prints the SHA-256 fingerprint of a file, which changes if the file changes; FreeBSD's name for sha256sum, which recent releases also accept.sha256sum: Prints a file's SHA-256 hash, the same one sha256 prints, in the Linux layout; FreeBSD 14 and 15 include this Linux name, so Linux habits and scripts work.sockstat: Lists open network sockets with the user, program, and process ID behind each, such as what listens on port 22; FreeBSD's counterpart of Linux ss.sshd: Checks the SSH server's configuration file with -t and prints any error, or nothing when the file is valid, so you catch errors before restarting sshd.stat: Shows a file's details: owner, group, permissions, size, and the times it was last read, changed, and created.strings: Prints the readable text inside a binary file, such as addresses, commands, or file paths, a quick look at what a suspicious program does.sysctl: Reads or changes kernel settings while the system runs, such as kern.securelevel or net.inet.ip.forwarding; lines in /etc/sysctl.conf keep them after reboot.sysrc: Reads, sets, or removes settings in /etc/rc.conf without opening an editor, such as sshd_enable=YES to start sshd at every boot; FreeBSD's counterpart of systemctl enable.tail: Prints the last lines of a file, 10 unless you say otherwise, such as the newest entries in /var/log/auth.log; -f keeps watching for new lines.tcpdump: Captures network packets on an interface and prints them; on pflog0 it shows the packets pf logged, such as blocked connection attempts.tr: Swaps, squeezes, or deletes characters in text from a pipe, such as turning the commas in wheel's member list into spaces so a script can loop over the names.uname: Prints system facts: the OS name, host name, release, kernel build, and hardware type.vi: Opens a text file in the vi editor so you can change it, such as /etc/pf.conf, /etc/login.conf, or /etc/ssh/sshd_config.vipw: Opens /etc/master.passwd in an editor with a lock, checks the file when you save, and rebuilds the password databases, the safe way to hand-edit accounts.visudo: Edits the sudo rules in /usr/local/etc/sudoers with a lock and checks them before saving; on FreeBSD sudo is a package, so visudo exists only after pkg install sudo.w: Shows who is logged in right now, from where, how long they have been idle, and what each is running, plus uptime and load.which: Prints the full path of the program that runs when you type a command name, such as whether nc or socat is installed.aaa authentication login: Builds a named sign-in method list, such as VTY-LOGIN, that a line uses with login authentication <list-name>; the methods are tried in the order you list them.aaa authentication login default: Sets the default sign-in method list, which every line uses unless it names its own list; aaa authentication login default local checks the local accounts.aaa new-model: Turns on the AAA system, which replaces the old per-line passwords with method lists for sign-in, such as local accounts or a RADIUS server.aaa session-id common: Gives every AAA record of one session, from sign-in to accounting, the same session ID, so a log server can tie them together; common is the default.access-class: Applies an access list to the VTY lines, so only the addresses it permits can open a Telnet or SSH session to the device.access-list: Creates or adds a line to a numbered access list, a top-to-bottom list of permit and deny rules that filters traffic by address.archive: Opens archive mode, where log config sets up a record of each configuration command and who typed it, and path names where numbered copies go.banner exec: Sets a message shown right after someone signs in and their session starts.banner login: Sets a notice shown just before the username and password prompts, after the message of the day.banner motd: Sets the message of the day, a notice shown to everyone who connects, before they sign in, such as a warning that access is monitored.boot: Sets where the device loads its software or configuration at startup; no boot network stops it from loading a configuration from a network server.cdp enable: Turns CDP on or off for one interface; no cdp enable keeps the device from announcing itself out that port, such as an ISP link.cdp run: Turns the Cisco Discovery Protocol on or off for the whole device; no cdp run stops it from telling neighbors its model, IOS version, and addresses.cdp timer: Sets how often, in seconds, the device sends CDP announcements to its neighbors; the default is 60.clear access-list counters: Sets the match counts that show access-lists prints back to zero, so the hits from your next test stand out.clear arp-cache: Deletes the ARP entries the device learned, so it asks again for each address's MAC, such as after a device swap or an ARP poisoning attempt.clear ip ospf process: Restarts OSPF on the router, so new settings such as a router-id take effect and neighbors form again.clear line: Disconnects whoever is using a console or VTY line, ending their session.clear logging: Empties the log messages kept in memory, the ones show logging prints, after asking you to confirm.clear mac address-table: Empties the switch's learned MAC address table, so it relearns which device sits on which port.clear port-security: Removes secure MAC addresses from port security, such as an old sticky address after an approved device swap.clear port-security all: Removes every secure MAC address, whether learned, sticky, or typed in, from all ports or from the one you name.clear port-security configured: Removes the secure MAC addresses typed in by hand with switchport port-security mac-address <mac>.clear port-security dynamic: Removes the secure MAC addresses port security learned on its own, without sticky, so the port can learn new ones.clear port-security sticky: Removes a port's saved sticky MAC addresses, such as an old PC's, so the port can learn the new device; on an err-disabled port, shutdown then no shutdown brings it back.clock set: Sets the device's date and time by hand, which makes log timestamps match real time.clock summer-time: Turns on daylight saving time for the clock, such as clock summer-time PDT recurring.clock timezone: Sets the time zone name and its offset from UTC, so the clock and log timestamps show local time.config-register: Sets the configuration register, the boot setting that decides whether the router loads its saved configuration at the next reload.configure terminal: Enters global configuration mode, where you type the settings that change how the device works.connect: Opens a Telnet session to another device, the same as the telnet command.copy running-config: Saves a backup copy of the running configuration to a file in flash or on a TFTP server.copy running-config startup-config: Saves the running configuration to NVRAM as the startup configuration, so your changes survive a reload or power loss.crypto key generate rsa: Makes the RSA key pair that the SSH server needs; set a hostname and ip domain-name first, because the key is named after them.crypto key zeroize rsa: Deletes the device's RSA key pairs, which also turns the SSH server off.default-information originate: Advertises this router's default route to its OSPF neighbors, so they send Internet-bound traffic here.default-router: Sets the default gateway that this DHCP pool gives to its clients.deny: Adds a block line to the access list you are editing; the first line a packet matches decides what happens to it.description: Labels an interface with a note, such as Trunk to SwA G0/1, so admins know what each port connects to.dir: Lists the files in flash memory or NVRAM, such as the IOS image and saved configurations, with their sizes.disable: Leaves privileged EXEC and returns to user EXEC, the > prompt with read-only commands.dns-server: Sets the DNS server address that this DHCP pool gives to its clients.do: Runs an EXEC command, such as a show command or a save, without leaving configuration mode.domain-name: Sets the domain name that this DHCP pool gives to its clients.duplex: Sets whether a port sends and receives at the same time (full), takes turns (half), or works it out with the other end (auto).enable: Moves from user EXEC (>) to privileged EXEC (#), asking for the enable secret if one is set.enable algorithm-type: Sets the enable secret with a stronger hash than type 5: scrypt (type 9) or PBKDF2 SHA-256 (type 8); ISR routers need IOS 15.3(3)M3 or later.enable password: Sets the old-style privileged EXEC password, stored in plain text or weak type 7; use enable secret and remove this one.enable secret: Sets the password for privileged EXEC (#), stored as a one-way hash (type 5, MD5, on most IOS 15 images); it wins over enable password when both exist.encapsulation dot1q: Tags a router subinterface with one VLAN, so it becomes that VLAN's gateway on a router-on-a-stick trunk.end: Leaves any configuration mode and returns straight to privileged EXEC; Ctrl+Z does the same.erase startup-config: Deletes the saved startup configuration from NVRAM, so the device starts with a blank configuration at the next reload.errdisable recovery: Brings err-disabled ports back up on their own after a wait, such as ports shut by port security or BPDU guard.exec: Controls whether a line can start a CLI session; no exec closes an unused port such as aux to anyone who plugs in.exec-banner: Controls whether this line shows the EXEC and message-of-the-day banners; no exec-banner hides both on that line.exec-timeout: Signs out an idle session on the line after the time you set, so an unattended console or SSH window closes itself.exit: Goes back one level, such as from interface configuration to global configuration, or signs out when typed at the EXEC prompt.help: Explains how the built-in help works; typing ? after a word lists what can come next.hidekeys: Hides passwords and keys in the configuration change log and its log messages, so the record of changes leaks no secrets.history size: Sets how many recent commands this line remembers for the up-arrow and show history; the default is 10.hostname: Gives the device its name, which shows in the prompt and is needed before making RSA keys for SSH.interface: Selects one interface to configure, such as a port, a VLAN interface (SVI), or a router subinterface.interface range: Selects several interfaces at once, so one set of commands configures them all, such as shutting every unused port.ip access-group: Applies an access list to an interface, filtering the packets that arrive (in) or leave (out) through that port.ip access-list extended: Creates or opens a named extended access list, which filters by protocol, source, destination, and port, such as an inbound edge list.ip access-list standard: Creates or opens a named or numbered standard access list, which filters by source address, and lets you add, insert, or remove single lines.ip address: Gives an interface, SVI, or subinterface its IPv4 address and subnet mask.ip arp inspection: Turns on Dynamic ARP Inspection for a VLAN, which drops ARP packets that disagree with the DHCP snooping records, stopping ARP poisoning.ip arp inspection trust: Marks a port as trusted for Dynamic ARP Inspection, such as an uplink, so its ARP traffic passes unchecked.ip bootp server: Turns the BOOTP server on or off; no ip bootp server closes an old address-assignment service that few networks need.ip cef: Turns on Cisco Express Forwarding (on by default), the fast way IOS 15 routers forward packets; no ip cef makes the processor handle each packet the slow way.ip classless: Lets the router use its default route for unknown subnets of networks it partly knows; it is on by default.ip default-gateway: Sets the router a layer 2 switch sends its own management traffic through, so you can reach the switch from other subnets.ip dhcp excluded-address: Reserves addresses for the DHCP server to skip, such as the gateway and printers.ip dhcp pool: Creates a DHCP address pool on the router, so it hands out addresses, a gateway, and DNS settings to clients.ip dhcp snooping: Turns on DHCP snooping, which drops DHCP server replies from untrusted ports so only the trusted DHCP server hands out addresses.ip dhcp snooping limit rate: Limits how many DHCP packets per second a port may send; a port over the limit is shut down (err-disabled).ip dhcp snooping trust: Marks a port as trusted for DHCP snooping, such as the uplink toward the real DHCP server, so its DHCP replies pass.ip dhcp snooping vlan: Chooses the VLANs where DHCP snooping watches for rogue DHCP servers.ip directed-broadcast: Controls whether a packet sent to a whole subnet's broadcast address is passed on; no ip directed-broadcast blocks smurf attacks.ip domain lookup: Controls DNS lookups of names, the newer spelling of ip domain-lookup; no ip domain lookup stops typos from being looked up as hostnames.ip domain name: Sets the device's default DNS domain name, the newer spelling of ip domain-name.ip domain-lookup: Controls DNS lookups of names; no ip domain-lookup stops a mistyped command from freezing the prompt while it is looked up as a hostname.ip domain-name: Sets the device's default DNS domain name, such as school.lan; SSH setup needs it because the RSA key is named hostname.domain.ip finger: Turns the finger service on or off; no ip finger stops the device from telling anyone who asks which users are signed in.ip helper-address: Forwards DHCP requests that arrive on this interface to a DHCP server in another subnet, so clients there still get addresses.ip http authentication: Sets how the web management page checks sign-ins, such as with the local accounts or the enable password.ip http port: Moves the plain-HTTP web management page from port 80 to another port, such as 8080; the page keeps answering there, so a scan still finds it.ip http secure-port: Moves the HTTPS web management page from port 443 to another port; the page keeps answering there, so no ip http secure-server is what closes it.ip http secure-server: Turns the HTTPS web management page on or off; no ip http secure-server closes it when nobody manages the device from a browser.ip http server: Turns the plain-HTTP web management page on or off; no ip http server closes that unencrypted way in.ip mask-reply: Controls whether the interface answers ICMP requests for its subnet mask; no ip mask-reply keeps the answer to itself.ip name-server: Sets the DNS server the device asks when it turns hostnames into addresses.ip proxy-arp: Controls whether the router answers ARP requests for addresses on other networks; no ip proxy-arp turns that off.ip redirects: Controls whether the interface sends ICMP redirect messages; no ip redirects stops them, which hides routing details.ip route: Adds a static route that tells the router where to send traffic for a network, through a next-hop address or an exit interface.ip routing: Turns on routing between networks; routers have it on already, and layer 3 switches need it to route between VLANs.ip source-route: Controls whether the router honors packets that pick their own path; no ip source-route drops them, closing a spoofing trick.ip ssh authentication-retries: Sets how many password tries an SSH connection gets before the device closes it.ip ssh time-out: Sets how many seconds a person has to finish signing in over SSH before the connection closes.ip ssh version: Sets which SSH version the server accepts; ip ssh version 2 turns off the weaker version 1.ip unreachables: Controls whether the interface sends ICMP unreachable messages; no ip unreachables stops them, which slows network mapping.lease: Sets how long clients may keep an address from this DHCP pool before they must renew it; the default is one day.line aux: Opens the settings for the auxiliary port, a router port meant for a modem that can open a CLI session.line console: Opens the settings for the console port, the cable connection right on the device, such as its password and time-out.line vty: Opens the settings for the virtual terminal lines that Telnet and SSH sessions use, such as passwords, transport, and access lists.lldp holdtime: Sets how many seconds a neighbor keeps this device's LLDP details before discarding them; the default is 120.lldp receive: Lets this port read LLDP announcements from the device on the other end; no lldp receive makes the port ignore them.lldp run: Turns the standard Link Layer Discovery Protocol on or off for the whole device; no lldp run stops it from announcing itself to neighbors.lldp timer: Sets how often, in seconds, the device sends LLDP announcements to its neighbors; the default is 30.lldp transmit: Lets this port send LLDP announcements about the switch; no lldp transmit keeps the switch's name, model, and address off that port.log config: Opens the configuration change log settings inside archive mode, where logging enable starts recording each configuration command and the user who typed it.log-adjacency-changes: Logs a message each time an OSPF neighbor comes up or goes down; it is on by default.logging buffered: Keeps recent log messages in the device's memory, where show logging can display them.logging console: Sets which log messages print on the console; no logging console stops them from interrupting console work.logging enable: Starts the configuration change log, which records every command typed in configuration mode along with the user who typed it.logging host: Sends the device's log messages to a syslog server, so a copy survives even if the device is wiped or restarted.logging monitor: Sets the lowest severity of log messages that reach SSH and Telnet sessions running terminal monitor; the default is debugging, which sends every level.logging on: Turns on message logging to every destination that is set up, such as the buffer, terminals, and syslog servers; it is on by default.logging size: Sets how many configuration commands the change log keeps in memory; when it fills, the oldest entries make room for new ones.logging synchronous: Reprints your half-typed command after a log message interrupts it, so messages stop scrambling what you type.logging trap: Sets the lowest severity of messages sent to the syslog server, such as informational or warnings.login: Turns on the password check for a line; login local asks for a username and password from the local accounts instead.login block-for: Blocks remote sign-ins (Telnet, SSH, and HTTP) for a while after too many failures in a short time, which slows password guessing; the console still works.login on-failure: Writes a log message each time a sign-in fails, so password guessing shows up in the logs.login on-success: Writes a log message each time someone signs in successfully, so you have a record of who connected.logout: Ends your session on the device and signs you out.mdix auto: Lets a switch port detect the cable type and swap its send and receive pairs, so straight-through and crossover cables both work.monitor session: Sets up a SPAN session that copies traffic from ports or a VLAN to another port, where a capture tool such as tcpdump can watch it.motd-banner: Controls whether this line shows the message-of-the-day banner; no motd-banner hides it on that line.name: Names the VLAN you are configuring, such as STUDENTS, so show vlan lists something meaningful.network: Under router ospf, turns on OSPF for interfaces in an address range and assigns their area; in a DHCP pool, sets the subnet handed out.no <sequence>: Removes one line from an access list by its sequence number, the number shown beside each line in show access-lists.notify syslog: Sends each configuration command the change log records to syslog as well, so the log server keeps its own copy of every change.ntp authenticate: Turns on NTP authentication, so the device accepts time only from servers that prove a shared key.ntp master: Makes this device an NTP time source for others, using its own clock at the stratum you give.ntp server: Tells the device to get its time from an NTP server, so its clock and log timestamps stay accurate and match the rest of the network.ntp update-calendar: Has NTP keep the hardware calendar, the battery-backed clock, set to the synchronized time, so the right time survives a reload.passive-interface: Stops OSPF from sending hellos out an interface, such as a LAN with only PCs, while still advertising that network.password: Sets the password for the console or VTY lines you are configuring; login makes the line ask for it.path: Names where archive mode saves its copies of the running configuration, such as flash:archive-config; IOS adds a number to each copy's file name.permit: Adds an allow line to the access list you are editing; the first line a packet matches decides what happens to it.ping: Sends test packets to an address and reports how many replies came back, which shows whether the path works.privilege: Sets the privilege level that sessions on this line start at, such as level 15 for full control right after sign-in.redistribute: Shares routes from another source, such as static routes, with OSPF neighbors.reload: Restarts the device, which loads the startup configuration and drops every session.remark: Adds a comment line to the access list you are editing, so the next admin knows what the list is for.router ospf: Starts an OSPF process and opens its settings, where network commands choose which interfaces share routes.router-id: Sets the OSPF router ID, the address-style name each router uses with its neighbors; if OSPF already chose an ID, the new one applies after clear ip ospf process.secure boot-image / boot-config: Turns on resilient configuration, which keeps a hidden, protected copy of the IOS image and the running configuration that erase and delete commands leave intact.security passwords min-length: Sets the shortest password the device accepts for new enable, line, and user passwords.service config: Controls whether the device loads its configuration from a network server at startup; no service config keeps it on the saved configuration.service pad: Turns the old X.25 packet assembler service on or off; no service pad closes a service modern networks leave unused.service password-encryption: Hides plain-text passwords in the configuration with type 7 encoding, which stops someone reading over your shoulder but free tools decode in seconds.service password-recovery: Controls the password-recovery break sequence at startup; no service password-recovery stops someone with the console cable from bypassing the passwords.service sequence-numbers: Numbers each log message in order, so a gap in the numbers shows that messages went missing.service tcp-keepalives-in: Checks incoming TCP sessions, such as VTY logins, for a live other end and closes dead ones, which frees their lines.service tcp-keepalives-out: Checks outgoing TCP sessions started from the device for a live other end and closes dead ones.service tcp-small-servers: Turns the small TCP test services, such as echo, discard, and chargen, on or off; no service tcp-small-servers closes them.service timestamps: Adds the date and time (down to the millisecond with msec) to each log or debug message, so events line up with other logs.service udp-small-servers: Turns the small UDP test services, such as echo, discard, and chargen, on or off; no service udp-small-servers closes them.session-timeout: Closes a connection opened from this line to another device after it sits idle for the given number of minutes.show access-lists: Lists every access list with its numbered lines and a count of the packets each line has matched.show arp: Lists the ARP table, which pairs each IP address the device has talked to with its MAC address.show cdp: Shows whether CDP is running on the device, with how often it announces itself and how long neighbors keep its details; with CDP off, it reports that CDP is off.show cdp neighbors: Lists the Cisco devices directly connected to this one, learned through CDP: their names, models, and the ports that link you.show clock: Shows the device's current date, time, and time zone; a leading * or . means the clock is unsynced.show crypto key mypubkey rsa: Shows the device's RSA public keys, which proves the key pair SSH needs exists.show flash: Lists the files in flash memory, such as the IOS image, and shows how much space is free.show history: Lists the commands you typed recently in this session.show hosts: Shows the default domain name, the DNS servers, and the host table: names set with ip host and names the device looked up recently.show interfaces: Shows each interface's status, hardware address, speed, duplex, and error counters, such as input errors and collisions.show interfaces description: Lists each interface with its status and the description label it was given.show interfaces status: Lists every switch port on one line with its label, state (connected, notconnect, err-disabled), VLAN, duplex, and speed.show interfaces switchport: Shows each switch port's mode (access or trunk), its access VLAN, native VLAN, and whether it negotiates trunking.show interfaces trunk: Lists the trunk ports with their native VLAN and the VLANs each one allows and carries.show inventory: Lists the device's hardware parts, such as the chassis, modules, and power supplies, with each part's product ID and serial number.show ip access-lists: Lists the IPv4 access lists with their lines and match counts, the same view as show access-lists limited to IP lists.show ip arp: Lists the IPv4 ARP table, pairing each IP address with its MAC address and interface.show ip dhcp binding: Lists the addresses the router's DHCP server has handed out, with each client's hardware address and lease time.show ip dhcp snooping: Shows whether DHCP snooping is on, which VLANs it watches, and which ports are trusted.show ip interface: Shows each interface's IP address and status; show ip interface brief fits every interface on one line each.show ip ospf: Shows OSPF process details, such as the router ID, areas, and timers.show ip ospf interface: Shows which interfaces run OSPF, their area, cost, and neighbor count.show ip ospf neighbor: Lists OSPF neighbors with their router ID, state, and interface; FULL means the two routers have finished swapping their route databases.show ip protocols: Shows which routing protocols run, the networks each advertises, its passive interfaces, and where routes come from.show ip route: Shows the routing table: every network the router knows, how it learned each one, and where it sends that traffic.show ip ssh: Shows whether the SSH server is on, its version, time-out, and retry limit.show line: Lists every console, aux, and VTY line with its status, speed, and settings.show lldp: Shows whether LLDP is running, how often it sends announcements, and how long neighbors keep its details; with LLDP off, it reports that LLDP is off.show lldp neighbors: Lists the devices directly connected to this one that announce themselves with LLDP, the open standard that devices from any vendor can speak.show logging: Shows the logging settings and the recent log messages kept in memory, such as interface changes and failed sign-ins.show login: Shows the sign-in protection settings, such as login block-for, and whether the device is blocking sign-ins right now.show mac address-table: Lists the MAC addresses the switch has learned and the port and VLAN where each device sits.show monitor: Shows the SPAN sessions on the switch: each one's source ports or VLANs, the direction it copies, and its destination port.show ntp associations: Lists the NTP servers the device talks to and marks the one it is synced with, with an asterisk.show ntp status: Shows whether the clock is synchronized through NTP, its stratum, and the server it follows.show port-security: Shows port security on each port: the address limit, the addresses learned, violation counts, and the action taken.show privilege: Shows the privilege level of your current session, such as 1 for user EXEC or 15 for full control.show processes: Lists the running IOS processes, after a header that shows how busy the processor was over the last 5 seconds, 1 minute, and 5 minutes.show protocols: Shows whether IP routing is on, then each interface's line and protocol status with its IP address and mask.show running-config: Shows the configuration the device is using right now, including changes typed since the last save.show sessions: Lists the Telnet and SSH connections you opened from this device to others, so you can resume or close them.show snmp: Shows SNMP activity counters, such as packets received and bad community names, or reports that the SNMP agent is off.show spanning-tree: Shows the spanning tree for each VLAN: which switch is the root, and whether each port is forwarding or blocking.show ssh: Lists the SSH sessions connected to this device right now, with their users and encryption.show startup-config: Shows the saved configuration in NVRAM, the one the device loads at the next reload.show terminal: Shows the settings of the line you are using right now, such as its length, width, history size, and idle time-out.show users: Lists who is signed in on each line, console or VTY, and where they connected from; an asterisk marks your own session.show version: Shows the IOS version, model, uptime, memory, serial number, and the reason for the last restart.show vlan: Lists the VLANs on the switch with their names, status, and the access ports in each.show vtp status: Shows the switch's VTP mode, domain name, and configuration revision number.shutdown: Turns an interface off; no shutdown turns it on, which router interfaces need because they start off.snmp-server: Sets up the SNMP agent that monitoring systems poll; no snmp-server turns SNMP off completely.snmp-server community: Sets an SNMP v1/v2c community string, a shared password that lets monitoring tools read (RO) or change (RW) the device's settings.snmp-server group: Creates an SNMPv3 group and sets its security level, such as priv, which requires both message authentication and encryption.snmp-server user: Creates an SNMPv3 user in a group, with an authentication password and an encryption password.spanning-tree bpdufilter: Stops a port from sending or receiving spanning tree messages, which takes the port out of loop protection.spanning-tree bpduguard: Shuts a port (err-disabled) the moment it hears from another switch, which keeps a rogue or misplaced switch out of the spanning tree.spanning-tree cost: Sets the spanning tree cost of a port, which changes which path spanning tree keeps open; lower cost is preferred.spanning-tree extend system-id: Changes a global spanning tree setting; spanning-tree extend system-id, on by default, adds the VLAN number to each bridge ID.spanning-tree guard: Turns on root guard or loop guard for a port, so it refuses to let a device there become the root bridge or form a loop.spanning-tree mode: Picks the spanning tree version the switch runs, such as rapid-pvst, which recovers from link changes in seconds.spanning-tree portfast: Lets an access port start forwarding as soon as a device plugs in, skipping the spanning tree wait of about 30 seconds.spanning-tree vlan: Tunes spanning tree for a VLAN, such as making this switch the root bridge with root primary or a lower priority.speed: Sets a port's speed in megabits per second or lets it negotiate with the other end.ssh: Opens an encrypted SSH session from this device to another device, signing in as the user you name.state: Sets a VLAN to active or suspend; a suspended VLAN passes no traffic.storm-control: Limits broadcast, multicast, or unicast traffic on a port to a share of its bandwidth, which contains broadcast storms.switchport access vlan: Puts an access port into a VLAN, so the device plugged in joins that network; the switch creates the VLAN if it is missing.switchport mode: Sets a switch port as an access port in one VLAN, a trunk that carries many VLANs, or a port that negotiates with DTP.switchport nonegotiate: Turns off DTP on a port set to access or trunk, so it keeps that mode whatever is plugged in, which blocks switch-spoofing attacks.switchport port-security: Turns on port security, which limits an access port to known MAC addresses and acts when an unknown device plugs in; set switchport mode access first.switchport protected: Makes a switch port a protected port, which trades traffic only with unprotected ports, such as the uplink, and stays apart from the other protected ports on that switch.switchport trunk allowed vlan: Sets which VLANs a trunk carries, so only the VLANs that belong on that link cross it.switchport trunk encapsulation: Picks the trunk tagging type on switches that also support ISL, such as the 3560; it comes before switchport mode trunk.switchport trunk native vlan: Sets the native VLAN, the one a trunk carries untagged; both ends must match, and an unused VLAN such as 99 blocks double-tagging attacks.switchport voice vlan: Sets a second VLAN for an IP phone on an access port, so phone traffic is tagged apart from the PC's data VLAN.telnet: Opens a Telnet session from this device to another device; everything, passwords included, travels unencrypted.terminal length: Sets how many lines of output show before --More-- pauses; terminal length 0 prints long output without pausing.terminal monitor: Shows log and debug messages in your SSH or Telnet session, which by default only the console sees.terminal no monitor: Stops showing log and debug messages in your SSH or Telnet session.time-period: Has archive mode save a copy of the running configuration on a timer, every so many minutes, into the place that path names.traceroute: Lists each router a packet passes through on the way to an address, which shows where a path breaks.transport input: Sets which protocols can open a session on these lines; transport input ssh allows SSH and refuses Telnet, which sends passwords in clear text.transport output: Sets which protocols a user on these lines can use to connect onward to other devices, such as transport output ssh.transport preferred: Sets the protocol the line assumes when you type only a hostname; transport preferred none stops typos from turning into connection attempts.undebug all: Turns off every running debug at once.username: Creates or changes a local account that can sign in with login local, with its password and privilege level; no username deletes it.vlan: Creates a VLAN, or opens it to name it, so ports can be grouped into separate networks on one switch.vtp domain: Names the VTP domain, the group of switches that share one VLAN list; in transparent or off mode, the switch keeps its own VLAN list whatever the name.vtp mode: Sets how the switch takes part in VTP; transparent keeps its own VLAN list and ignores updates from other switches.vtp password: Sets the VTP domain password; switches in the domain accept VLAN updates only from switches that use the same password.vtp version: Sets which VTP version the switch runs: 1 (the default), 2, or 3; version 3 adds extended-range VLANs and a hidden or secret password.where: Lists the connections you opened from this device to others, the same as show sessions.write: Saves the running configuration to NVRAM; write by itself does the same as write memory.write memory: Saves the running configuration as the startup configuration, the short form of copy running-config startup-config.write-memory: Has archive mode save a numbered copy of the configuration each time someone saves it with write memory or copy running-config startup-config.