Commands
Curated shell and tool commands for Linux, Windows, Python, Git, Django, SQL, and Nginx – searchable, filterable, and copyable with one click.
203 Commands found
No commands found. Try a different search or filter.
-
Django Bash
Check for model changes that would require new migrations
Compares the current model definitions against the existing migration files and reports whether new migrations would be needed, exiting with a non-zero status if so, without writing any migration file (--dry-run is implied by --check). Also performs a read-only consistency check against the migration history table of the default database to verify that already-applied migrations have their dependencies satisfied; if that database is unreachable, this check is skipped with a warning instead of failing.
python manage.py makemigrations --check --dry-run -
Django Bash
Check for unapplied migrations without applying them
Checks whether any migrations are unapplied for the configured database and exits with a non-zero status if so, without actually applying any migration. Reads the migration history table from the database (a read-only query); does not change the schema or any data.
python manage.py migrate --check -
Django Bash
Generate draft models from the existing database schema
Introspects the tables in the configured database and prints a best-effort draft of the Django models matching them to standard output. Connects to the configured database to read its schema (read-only introspection); does not create any files or modify the database.
python manage.py inspectdb -
Django Bash
Generate sequence-reset SQL
Print sequence-reset SQL for the website app; do not execute it automatically. Output depends on the database backend and may be empty.
python manage.py sqlsequencereset website -
Django Bash
Inspect settings differences locally
Show settings that differ from Django defaults. Output can contain secrets: inspect locally and never share or log it.
python manage.py diffsettings -
Django Bash
List all available management commands
Prints every management command available in the current project, grouped by the Django app that provides it. Read-only; does not connect to the database or modify anything.
python manage.py help -
Django Bash
List all available system check tags
Lists the tag names that can be passed to check --tag (e.g. models, urls, admin) to scope which checks run, without performing any checks itself. Read-only; does not connect to the database.
python manage.py check --list-tags -
Django Bash
Locate every source location of a static file
Searches all configured static file locations (STATICFILES_DIRS and installed apps' static directories) for css/site.css, an actual file already present in this project's static directory at that relative path (static/css/site.css under STATICFILES_DIRS), and prints every location where it was found, including which one would actually be served. Replace css/site.css with another static file's path relative to its static root to look up instead. Read-only.
python manage.py findstatic css/site.css -
Django Bash
Open an interactive client for the configured database
Opens the interactive command-line client for the database engine configured in Django settings, using the permissions configured for that connection. The appropriate client must be installed and available on PATH. You can then enter SQL statements, including statements that modify or destroy data, to the extent allowed by the configured database permissions. With the MySQL backend, Django may pass the password to the client through the MYSQL_PWD environment variable; depending on the operating system, process environments may be visible to other processes or users. Do not expose credentials in output or examples.
python manage.py dbshell -
Django Bash
Preview database migrations
Shows which migrations would be applied without actually running them. Does not change the database.
python manage.py migrate --plan -
Django Bash
Preview the SQL statements of a specific migration
Prints the raw SQL statements that the migration 0001 of the website app would execute, without actually running it against the database. website and 0001 refer to an app and migration that already exist in this project; replace them to preview a different migration. Reads the migration history table from the database to resolve the migration graph and uses the connection to determine the correct SQL dialect; does not execute any of the generated statements.
python manage.py sqlmigrate website 0001 -
Django Bash
Preview the SQL that would reset all table data
Prints the SQL statements that the flush command would execute to remove all data from every table and reset auto-increment counters, without actually running them. Connects to the database only to enumerate its existing tables; does not delete any data itself.
python manage.py sqlflush -
Django Bash
Preview which static files would be collected
Shows exactly which static files would be copied into STATIC_ROOT by a real collectstatic run, without actually copying or overwriting anything. Reads the configured STATICFILES_DIRS and each installed app's static directory; does not connect to the database.
python manage.py collectstatic --dry-run -
Django Bash
Print the configured list of installed apps
Runs a one-off Python snippet that prints the INSTALLED_APPS setting exactly as loaded for this invocation, showing every Django app and third-party or project app currently enabled. Requires Django's settings to be loadable (e.g. a valid DJANGO_SETTINGS_MODULE); read-only, does not query the database.
python manage.py shell -c "from django.conf import settings; print(settings.INSTALLED_APPS)" -
Django Bash
Print the top-level URL patterns of the root URLconf
Runs a one-off Python snippet that resolves the project's root URLconf and prints only the top-level URL patterns (the entries directly listed in urlpatterns), not the individual URLs nested inside included URLconfs such as an app's own urls.py. Requires the ROOT_URLCONF setting to point to a valid, importable module; read-only, does not query the database.
python manage.py shell -c "from django.urls import get_resolver; print([str(p.pattern) for p in get_resolver().url_patterns])" -
Django Bash
Run a one-off Python snippet inside the Django environment
Runs the given Python snippet with Django's settings already loaded and exits immediately afterwards, instead of opening an interactive session; this example prints the current value of the DEBUG setting. Read-only; does not query the database.
python manage.py shell -c "from django.conf import settings; print(settings.DEBUG)" -
Django Bash
Run deployment-oriented system checks against the loaded settings
Runs additional checks relevant to production deployments, such as HSTS, SSL redirect, and secret key strength, strictly based on the settings module actually loaded for this invocation (for example via DJANGO_SETTINGS_MODULE or --settings). Read-only; inspects settings values only and does not connect to the database.
python manage.py check --deploy -
Django Bash
Run Django system checks
Runs Django's system check framework to detect common configuration problems. Must be run from the project root.
python manage.py check -
Django Bash
Run only one app's tests with the --keepdb option
Runs only the tests belonging to the website app and passes --keepdb, which tells Django to preserve a file-based test database between separate runs instead of recreating it every time. For this project's current SQLite configuration, which defaults to an in-memory test database, that persistence benefit does not actually carry over between separate manage.py test invocations (each is a new process and the in-memory database is destroyed when it exits); --keepdb mainly speeds up repeated runs when the test database is file-based (e.g. MySQL/PostgreSQL, or SQLite configured with an explicit on-disk TEST NAME). This substitution of a test database for every configured alias is what keeps the originally configured database untouched by the runner itself, though it does not constrain what a specific test's own code might otherwise do with a direct connection.
python manage.py test website --keepdb -
Django Bash
Run only the model-related system checks
Runs only the system checks tagged models, validating field definitions, relations, and Meta options of installed models, instead of the full check suite. Read-only; model checks inspect code and app configuration and do not require a database connection.
python manage.py check --tag models -
Django Bash
Run system checks including the database checks for the default connection
Runs the regular system check suite exactly as plain check would, and additionally enables the checks tagged database for the default database alias; --database does not restrict the run to only the database tag. Whether the added database checks actually open a connection depends on the backend: for example, the MySQL backend queries the active SQL mode (which requires a reachable connection and fails if the database cannot be reached), while the SQLite backend used by this project performs no such check and needs no connection at all. Read-only with respect to data in all cases; never modifies any table.
python manage.py check --database default -
Django Bash
Run tests in parallel across all CPU cores
Runs the test suite using one worker process per detected CPU core instead of a single sequential process, which can noticeably reduce total run time on larger suites on supported platforms. Per Django's own documentation, this feature isn't available on Windows at all (it also doesn't work with the Oracle database backend), and it requires the third-party tblib package, installed separately via pip, to display worker tracebacks correctly. Each worker gets its own separate temporary test database; Django's default test runner substitutes these for every configured database alias and destroys them afterward, which is what keeps the originally configured database untouched by the runner itself, without constraining what a specific test's own code might otherwise do with a direct connection. Output ordering may differ from a sequential run.
python manage.py test --parallel auto -
Django Bash
Run the full test suite with detailed output
Runs every test in the project and prints a detailed, per-test result line instead of just dots. Django's default test runner creates a dedicated, temporary test database for each configured database alias before running and destroys it afterwards; this substitution is what keeps the originally configured database itself untouched by the runner, though it only covers the runner's own connection handling, not whatever a specific test's own code might otherwise do with a direct connection.
python manage.py test --verbosity 2 -
Django Bash
Show detailed help for a specific management command
Prints the full usage text, arguments, and options for the migrate command (used here as an example) without actually running it. Replace migrate with the name of any other command to see its help instead. Read-only; does not connect to the database.
python manage.py help migrate -
Django Bash
Show migration dependency order
Show the migration plan and applied markers without applying migrations. Requires access to the configured database.
python manage.py showmigrations --plan -
Django Bash
Show which migrations are applied for each app
Lists every migration grouped by app with an [X] or [ ] marker showing whether it has already been applied to the configured database. Reads the migration history table from the database (a lightweight metadata query); does not apply or change any migration.
python manage.py showmigrations -
Django Bash
Start an interactive Python shell with Django configured
Opens an interactive Python REPL with Django's settings already loaded, so models, settings, and the ORM can be used directly without manual setup. Opens an interactive session that stays open until exited explicitly; no database queries or changes occur unless code is actually typed and run inside it.
python manage.py shell -
Django Bash
Start the local development server
Starts Django's built-in development server bound exclusively to the local machine (127.0.0.1) on port 8000, with auto-reload on code changes enabled. Before starting, Django reads the migration history table of the default database to warn about unapplied migrations; the server fails to start if that database is unreachable. This server is intended only for local development, is not hardened or performant enough for production use, and runs in the foreground until stopped with Ctrl+C.
python manage.py runserver 127.0.0.1:8000 -
Django Bash
Stop tests after the first failure
Run the website app's tests and stop at the first failure. Use isolated local test settings, never production database credentials.
python manage.py test website --failfast -
Git Bash
Check whether a file is ignored and by which rule
Checks whether the given path would be ignored by Git based on .gitignore and related exclude rules, and if so, prints the exact file and pattern responsible. Replace example.log with the path to check; does not require the file to actually exist. Read-only.
git check-ignore -v example.log -
Git Bash
Check whitespace errors
Checks unstaged changes for whitespace errors such as trailing whitespace or conflicting indentation.
git diff --check -
Git Bash
Create a new local branch without switching to it
Creates a new local branch named feature/example, pointing at the current HEAD commit, without checking it out; the current branch and working tree remain unchanged. Replace feature/example with an actual descriptive branch name; fails if a branch with that name already exists.
git branch feature/example -
Git Bash
Create an annotated tag on the current commit
Creates an annotated tag named v1.0.0-example with the given message, pointing at the current HEAD commit. Replace v1.0.0-example and the message with actual values; this only creates a local tag object and does not push it to any remote, change files, or alter commit history.
git tag -a v1.0.0-example -m "Example annotated tag" -
Git Bash
Find commits that changed a string count
Find commits that change the number of occurrences of example in example.txt. Replace both placeholders.
git log -S "example" --oneline -- example.txt -
Git Bash
Find the common ancestor commit of two branches
Prints the commit hash of the best common ancestor between main and feature/example, which is useful for understanding how far two branches have diverged before merging or rebasing. Replace main and feature/example with actual existing branch names; read-only, does not modify anything.
git merge-base main feature/example -
Git Bash
Inspect file attributes
Show the Git attributes associated with example.txt, such as line-ending rules. Replace the filename.
git check-attr --all -- example.txt -
Git Bash
Interactively stage selected changes in hunks
Starts an interactive prompt that walks through each changed hunk in the working tree and lets you choose whether to stage it, skip it, or split it further. This changes the index (staging area) for the hunks you accept, but does not modify the working tree files themselves or create a commit. Requires an interactive terminal.
git add -p -
Git Bash
List all files tracked by Git
Lists every file currently tracked in the index, i.e. files that Git is aware of regardless of whether they were changed. Read-only; does not modify anything.
git ls-files -
Git Bash
List configured remotes with their URLs
Lists all configured remote repositories together with their fetch and push URLs. Read-only; does not contact the network or modify anything.
git remote -v -
Git Bash
List files with unresolved merge conflicts
Lists only the paths of files that currently have unresolved ('unmerged') conflicts in the index, without showing their actual content. Read-only; useful to quickly see which files still need manual conflict resolution.
git diff --name-only --diff-filter=U -
Git Bash
List local branches with tracking and last commit info
Lists all local branches together with their last commit and, if configured, the remote-tracking branch and ahead/behind counts. Read-only; does not modify anything.
git branch --list -vv -
Git Bash
List local tags
Lists all tags that exist in the local repository. Read-only; does not contact the network or modify anything.
git tag -l -
Git Bash
List stored stashes without applying or removing them
Lists all stash entries currently stored in the repository with their index, branch, and a short description, without applying, dropping, or modifying any of them. Read-only; useful before deciding whether to apply or inspect a particular stash.
git stash list -
Git Bash
List untracked, non-ignored files
List untracked files while respecting the standard Git ignore rules.
git ls-files --others --exclude-standard -
Git Bash
Preview untracked files and directories that would be removed
Runs git clean in dry-run mode (-n) together with -d to also consider untracked directories, printing exactly which untracked files and directories would be deleted without actually removing anything. Safe to run at any time; only use the real git clean command (without -n) after carefully reviewing this output.
git clean -n -d -
Git Bash
Preview what a fetch would update without downloading it
Contacts the default remote and prints which refs would be updated by a real git fetch, without actually downloading objects or updating any local refs. Requires network access to the configured remote; safe to run at any time.
git fetch --dry-run -
Git Bash
Search tracked files for leftover conflict markers
Searches all tracked files in the working tree for lines containing the literal conflict marker <<<<<<< anywhere in the line (the pattern is not anchored to the start of the line, though real Git conflict markers always appear at column 1 in practice), printing matching file names and line numbers. This is a literal text search, not a placeholder to replace; useful for finding conflict markers that were accidentally left in and committed. Read-only; does not modify anything.
git grep -n "<<<<<<<" -
Git Bash
Show a compact, graphical commit history
Prints the commit history as one line per commit, with an ASCII graph showing branch and merge structure and decorations such as branch and tag names. Read-only; does not modify anything.
git log --oneline --graph --decorate -
Git Bash
Show commit history of a file across renames
Shows the commit history affecting the given file, continuing to follow it across renames that Git can detect. Replace example.txt with the path to an actually tracked file. Read-only; does not modify anything.
git log --follow -- example.txt -
Git Bash
Show detailed information about the origin remote
Contacts the remote named origin and shows its URL, HEAD branch, and the local branches tracking it, including whether they are up to date. Requires network access and an already configured origin remote; does not download objects or change any refs.
git remote show origin -
Git Bash
Show line-by-line authorship for a file
Annotates each line of the given file with the commit, author, and date that last changed it. Replace example.txt with the path to an actually tracked file. Read-only; can take noticeably longer on files with a long history.
git blame example.txt -
Git Bash
Show repository status
Shows a compact summary of the current branch and working tree changes. Must be run inside a Git repository.
git status --short --branch -
Git Bash
Show staged changes compared to the last commit
Shows the differences between the index (staging area) and the most recent commit (HEAD), i.e. exactly what would be included if you committed right now. Read-only; does not modify the index, working tree, or history.
git diff --staged -
Git Bash
Show the local history of where HEAD and branches have pointed
Shows a chronological log of where HEAD (and branch tips) have pointed locally, including commits from resets, rebases, or checkouts that are no longer reachable from any branch. Read-only and often the first step to recover seemingly lost commits; entries are local only and expire over time.
git reflog -
Git Bash
Show the metadata and diff of the most recent commit
Displays the commit message, author, date, and full diff of the most recent commit on the current branch (HEAD). Read-only; does not modify anything.
git show HEAD -
Git Bash
Show unstaged changes in the working tree
Shows the differences between the working tree and the index (staging area) for already tracked files, i.e. changes that have not yet been staged with git add. Read-only; does not modify any file, the index, or the commit history.
git diff -
Git Bash
Summarize changed files
Show a compact file and line-count summary of unstaged changes.
git diff --stat -
Git Bash
Unstage a file without changing its working tree content
Removes the specified file from the index (undoing a previous git add) while leaving its content in the working tree untouched; replace example.txt with the path to an actually staged file. This is a safe, reversible operation that neither deletes the file nor creates a commit.
git restore --staged example.txt -
Linux Bash
Check disk usage
Shows disk space usage for mounted filesystems in human-readable units (e.g. GB).
df -h -
Linux Bash
Check HTTP response headers
Sends a HEAD request to the given URL and prints only the HTTP response headers, without downloading the page body.
curl -I https://example.com -
Linux Bash
Check memory and swap usage
Shows total, used, and free physical memory and swap space in human-readable units (e.g. GB).
free -h -
Linux Bash
Check Nginx service status
Shows whether the Nginx systemd service is active, along with recent log lines. Requires systemd and appropriate permissions.
systemctl status nginx -
Linux Bash
Find log files below the current directory
Find regular files ending in .log below the current directory without changing them.
find . -type f -name '*.log' -
Linux Bash
Inspect file metadata
Show size, permissions, ownership and timestamps for example.txt with GNU stat. Replace the filename.
stat -- example.txt -
Linux Bash
List all running processes
Shows all processes on the system, including the owning user, resource usage, and full command line.
ps aux -
Linux Bash
List block devices and their mount points
Shows all block devices (disks and partitions) in a tree view, including size and where each one is mounted.
lsblk -
Linux Bash
List currently running services
Shows all systemd service units that are currently active and running. Requires systemd.
systemctl list-units --type=service --state=running -
Linux Bash
List failed systemd units
Shows systemd units that have entered a failed state, useful for quickly spotting services that did not start correctly. Requires systemd.
systemctl --failed -
Linux Bash
List listening TCP/UDP sockets with owning processes
Shows listening TCP and UDP sockets along with the process name and ID bound to each port. Viewing the owning process typically requires root privileges.
ss -tulnp -
Linux Bash
Query DNS records for a domain
Looks up the DNS records for the given domain and shows the resolver's response, including the resolved IP address. Requires the dnsutils/bind-utils package.
dig example.com -
Linux Bash
Resolve a file path
Resolve symbolic links and print an absolute path using GNU readlink. All components except the last must exist.
readlink -f -- example.txt -
Linux Bash
Show error-level journal entries since the last boot
Filters the systemd journal to entries at error priority or higher recorded since the last boot. Requires systemd.
journalctl -p err -b -
Linux Bash
Show hostname, OS, and kernel details
Displays the system hostname together with the operating system, kernel version, and virtualization information. Requires systemd.
hostnamectl -
Linux Bash
Show kernel version and system architecture
Prints the kernel name, version, build date, and machine hardware architecture.
uname -a -
Linux Bash
Show logged-in users and their current activity
Shows who is logged in and what command each user's session is currently running, along with system load.
w -
Linux Bash
Show network interfaces and their IP addresses
Lists all network interfaces along with their assigned IPv4 and IPv6 addresses and current state.
ip a -
Linux Bash
Show recent kernel error and warning messages
Filters the kernel ring buffer to only error and warning level messages. May require elevated permissions depending on system configuration.
dmesg --level=err,warn -
Linux Bash
Show system uptime and load averages
Displays how long the system has been running along with the 1, 5, and 15-minute load averages.
uptime -
Linux Bash
Show systemd journal entries since the last boot
Displays all journal log entries recorded since the most recent system boot. Requires systemd.
journalctl -b -
Linux Bash
Show the kernel routing table
Displays the system's current IP routing table, including the default gateway.
ip r -
Linux Bash
Show the last 10 login records
Lists the ten most recent login sessions from the system's login history.
last -n 10 -
Linux Bash
Show the ten largest items under /var/log
Lists files and directories under /var/log sorted by size, showing only the ten largest. Useful for finding what is consuming log disk space. This is a pipeline of three commands (du, sort, head), not a single binary.
du -ah /var/log | sort -rh | head -10 -
Linux Bash
Show user ID and group memberships
Prints the numeric user ID, group ID, and all group memberships for the current user, or for a specified user.
id -
Linux Bash
Show virtual memory statistics over five samples
Reports process, memory, paging, block I/O, and CPU statistics, sampled once per second for five samples.
vmstat 1 5 -
Linux Bash
Take a one-time snapshot of process activity
Runs top in batch mode for a single iteration, printing one static snapshot of CPU and memory usage per process instead of the interactive view. Output length depends on the number of running processes.
top -bn1 -
Linux Bash
Test network connectivity with four ICMP packets
Sends four ICMP echo requests to a public IP address to check basic network reachability, independent of DNS resolution.
ping -c 4 8.8.8.8 -
Linux Bash
Verify a SHA-256 checksum list
Check files against a trusted SHA256SUMS list from the expected working directory. A checksum alone does not prove authenticity.
sha256sum --check SHA256SUMS -
Nginx Bash
Break down DNS, TCP, TLS, and time-to-first-byte timings for a request
Requests https://example.com and prints five cumulative timing values measured by curl using its documented --write-out variables: time_namelookup (DNS resolution complete), time_connect (TCP handshake complete), time_appconnect (TLS handshake complete; 0 for plain HTTP), time_starttransfer (time to first byte of the response), and time_total (whole request). Each value is measured from the very start of the request, not as an isolated phase duration; subtract consecutive values (e.g. time_connect minus time_namelookup) to see how long an individual phase took. This is a more reliable way to see whether latency sits in DNS, connection setup, TLS, or the upstream/application behind nginx than guessing from response headers, which not every proxy sets. Performs an external network request.
curl -s -o /dev/null -w 'dns: %{time_namelookup}s, tcp: %{time_connect}s, tls: %{time_appconnect}s, ttfb: %{time_starttransfer}s, total: %{time_total}s\n' https://example.com -
Nginx Bash
Check for common security-related response headers
Fetches the response headers from https://example.com and filters them for Strict-Transport-Security, X-Frame-Options, and X-Content-Type-Options, three commonly recommended security headers. Performs an external network request; the absence of a match for one of these simply means that particular header is not set, which is itself useful diagnostic information, not an error.
curl -sI https://example.com | grep -Ei 'strict-transport-security|x-frame-options|x-content-type-options' -
Nginx Bash
Check Nginx configuration quietly
Test the configuration while suppressing non-error messages. Check the exit status; referenced files must be accessible. No reload is performed.
nginx -t -q -
Nginx Bash
Check the HTTP status code returned through a reverse proxy
Sends a request to https://example.com, discards the response body, and prints only the resulting HTTP status code, which is useful for confirming that a site behind an nginx reverse proxy responds as expected (e.g. 200 for a healthy upstream). Performs an external network request; replace example.com with the actual site being diagnosed.
curl -s -o /dev/null -w '%{http_code}\n' https://example.com -
Nginx Bash
Check whether nginx is enabled to start on boot
Prints whether the nginx systemd unit is enabled, disabled, static, or masked, i.e. whether it will start automatically on the next boot, independent of whether it is currently running. Read-only; requires systemd; the unit name is distribution-dependent.
systemctl is-enabled nginx -
Nginx Bash
Check whether ports 80 and 443 have an active listener
Uses ss's filter expression syntax to show only listening TCP sockets bound to source port 80 or 443, the standard HTTP and HTTPS ports, regardless of which process owns them. Read-only; a quick way to confirm something is listening on the expected web ports without needing to know the process name in advance.
ss -tln 'sport = :443 or sport = :80' -
Nginx Bash
Check whether the nginx service is currently active
Prints a single word (active, inactive, failed, ...) describing the current runtime state of the nginx systemd unit and sets the exit code accordingly, making it suitable for scripts and health checks without the verbose output of systemctl status nginx. Read-only; requires systemd and a service named nginx to exist, which is distribution-dependent (the unit is typically named nginx on Debian/Ubuntu-based systems).
systemctl is-active nginx -
Nginx Bash
Check which HTTP protocol version is actually negotiated
Sends a HEAD request using curl's dedicated -I/--head option (not -X HEAD, which only changes the request method text and is documented by curl as the wrong way to request headers-only) while asking curl to prefer HTTP/2 via --http2, then prints the response status line, which starts with the protocol version actually negotiated for this connection (e.g. "HTTP/2 200" or "HTTP/1.1 200 OK"). Requesting HTTP/2 only expresses a preference: it requires both curl to have been built with HTTP/2 support and the server to support it over TLS (via ALPN); if either side lacks support, curl falls back to HTTP/1.1, which is exactly why the negotiated version in the output must be checked rather than assumed from the flag alone. Performs an external network request.
curl -sI --http2 https://example.com -
Nginx Bash
Find recent server-error responses in the access log
Searches the access log for lines containing a 5xx HTTP status code (server errors such as 500, 502, 503) surrounded by spaces, then shows only the last 20 matches, which is useful for spotting recent upstream or application failures passed through nginx. Entries include client IP addresses and requested URLs, which can qualify as personal data; handle and share this output accordingly. Read-only; requires read access to the log file, which on Debian/Ubuntu packages typically means root/sudo or membership in the adm group; the exact log format and field order depend on the configured log_format directive.
grep ' 5[0-9][0-9] ' /var/log/nginx/access.log | tail -n 20 -
Nginx Bash
Follow all redirects and show the final effective URL
Starts at http://example.com, follows every redirect curl encounters (such as HTTP-to-HTTPS and a www-to-apex canonicalization), and reports how many redirect hops occurred along with the final URL actually reached. Performs an external network request; useful to verify an entire redirect chain in one call instead of inspecting each hop manually.
curl -s -o /dev/null -L -w '%{num_redirects} redirect(s), final: %{url_effective}\n' http://example.com -
Nginx Bash
Inspect Nginx service unit files
Show Nginx's systemd unit and drop-in files on disk without changing the service. They can contain secrets; do not share or log the output.
systemctl cat nginx --no-pager -
Nginx Bash
Inspect the complete Nginx configuration
Test and print the configuration, including included files. Output can contain secrets; inspect locally, never share or log it. File access is required.
nginx -T -
Nginx Bash
List certificates managed by Certbot and their expiry status
Lists every certificate Certbot currently manages on the local machine, including its domains, expiry date, and remaining validity, without renewing, revoking, or modifying any certificate. This is a local-only certificate inventory: it reads certificate and renewal configuration files under /etc/letsencrypt and normally does not contact any ACME server (unlike certbot renew). It does, however, write its own debug entry to Certbot's local log file (typically /var/log/letsencrypt/letsencrypt.log) on every invocation, including this read-only one. Requires Certbot to be installed and typically requires root/sudo privileges to read its configuration under /etc/letsencrypt.
certbot certificates -
Nginx Bash
List enabled nginx site configuration symlinks
Lists the symbolic links in /etc/nginx/sites-enabled, showing which site configurations are currently active without printing their contents. This sites-available/sites-enabled layout is the Debian/Ubuntu packaging convention (as used on this project's documented production server) and does not apply to RHEL/CentOS-style installations, which typically load configuration directly from conf.d instead. Read-only; may require read permission on /etc/nginx depending on its ownership.
find /etc/nginx/sites-enabled -maxdepth 1 -type l -
Nginx Bash
Measure the HTTP status code and total response time of a request
Requests https://example.com, discards the body, and prints the HTTP status code together with the total time curl took for the whole request. Useful as a quick combined health and latency check. Performs an external network request; timing includes DNS lookup, connection, TLS handshake, and transfer.
curl -s -o /dev/null -w 'HTTP %{http_code} in %{time_total}s\n' https://example.com -
Nginx Bash
Read today's Nginx service journal
Read accessible Nginx systemd journal entries since local midnight without a pager. This is not the Nginx access log; treat log contents as private.
journalctl -u nginx --since today --no-pager -
Nginx Bash
Show listen directives across enabled site configurations
Recursively searches /etc/nginx/sites-enabled for lines that consist of the listen directive at the start of a line (ignoring leading whitespace, matched with a documented POSIX character class instead of a locale-specific shorthand), printing the file name, line number, and the matching text. Because sites-enabled conventionally holds symlinks to files in sites-available, grep's -R (as opposed to plain -r, which only follows symlinks given directly on the command line) is required here so that the content of those linked files is actually searched rather than being skipped. This sites-available/sites-enabled layout is the Debian/Ubuntu packaging convention (as used on this project's documented production server) and does not apply to RHEL/CentOS-style installations, which typically load configuration directly from conf.d instead. Read-only; may require read permission on /etc/nginx depending on its ownership.
grep -RnE '^[[:space:]]*listen[[:space:]]' /etc/nginx/sites-enabled/ -
Nginx Bash
Show Nginx version
Prints the installed Nginx version to standard error.
nginx -v -
Nginx Bash
Show nginx version and build configuration details
Prints the nginx version together with the full configure-time build arguments, compiled-in modules, and the version of the TLS library it was built against. This is distinct from the lowercase nginx -v, which only prints the version number. Read-only; requires nginx to be installed and on PATH; no special privileges needed.
nginx -V -
Nginx Bash
Show the full set of HTTP response headers
Sends a request to https://example.com and prints only the HTTP response headers (status line, Content-Type, caching headers, security headers, etc.) without the response body. Performs an external network request; does not modify anything on the local machine, though whether the remote server itself treats this as side-effect-free depends on that server's own implementation, as with any HTTP request.
curl -sI https://example.com -
Nginx Bash
Show the HTTP status and target of a redirect
Requests http://example.com without following redirects, then prints the status code (typically 301 or 302 if nginx redirects HTTP to HTTPS) together with the Location header it would redirect to. Performs an external network request; if the server does not redirect, redirect_url will be empty.
curl -s -o /dev/null -w '%{http_code} -> %{redirect_url}\n' http://example.com -
Nginx Bash
Show the most recent nginx access log entries
Prints the last 50 lines of the nginx access log at its default Debian/Ubuntu path. Each line typically includes the client's IP address, requested URL, user agent, and referrer, which can qualify as personal data under privacy regulations such as the GDPR; handle and share this output accordingly. Read-only with respect to the log file; on Debian/Ubuntu packages the log directory is normally owned by root with group adm and is not readable by arbitrary users, so this typically requires root/sudo or membership in that group, though exact ownership and permissions can differ on other distributions or custom setups.
tail -n 50 /var/log/nginx/access.log -
Nginx Bash
Show the most recent nginx error log entries
Prints the last 50 lines of the nginx error log at its default Debian/Ubuntu path, showing recent configuration warnings, upstream connection failures, and similar operational problems. Entries can include client IP addresses and sometimes fragments of request data, which may qualify as personal or sensitive information; handle and share this output accordingly. Read-only with respect to the log file; on Debian/Ubuntu packages this file is normally owned by root with group adm, so it typically requires root/sudo or group membership for read access, though this can differ on other distributions or custom setups.
tail -n 50 /var/log/nginx/error.log -
Nginx Bash
Show the most recent systemd journal entries for nginx
Prints the last 50 journald log lines recorded for the nginx systemd unit, covering service start/stop/reload events and anything nginx wrote to standard error at startup, without opening the interactive pager. These entries generally contain less client-identifying detail than the access or error logs, but can still include request-related data depending on configuration; handle accordingly. Read-only; requires systemd and typically sufficient privileges to read the journal (membership in the systemd-journal group or root/sudo).
journalctl -u nginx -n 50 --no-pager -
Nginx Bash
Show the nginx command-line help
Prints nginx's built-in command-line usage summary, listing every supported startup option (such as -t, -T, -s, -g, -c, -p) with a short description of each. Read-only; requires nginx to be installed and on PATH; no special privileges needed.
nginx -h -
Nginx Bash
Show the subject, issuer, and validity dates of a site's TLS certificate
Connects to example.com on port 443 using openssl s_client with SNI set via -servername, pipes the retrieved certificate into openssl x509, and prints only its subject, issuer, and notBefore/notAfter validity dates, without dumping the full certificate or any private key material (none is ever transmitted by the server in a normal TLS handshake). Performs an external network connection; requires the openssl command-line tool to be installed.
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates -
Nginx Bash
Show which TCP ports nginx is actively listening on
Lists listening TCP sockets with their owning process (via ss -tlnp) and filters the output to lines mentioning nginx, showing the actual ports the running nginx master/worker processes are bound to right now, as opposed to what the configuration merely declares. Read-only; the -p flag to show process names/PIDs typically requires root or sudo privileges.
ss -tlnp | grep nginx -
Nginx Bash
Test whether a site accepts a TLS 1.2 connection
Connects to example.com on port 443 and explicitly requests a TLSv1.2 client hello using openssl s_client's documented -tls1_2 option, combined with -brief (supported since OpenSSL 1.1.1) to print a concise summary instead of the full certificate dump. Unlike filtering the full output with grep for ad hoc keywords such as "Protocol" or "Cipher", which can still match on a failed handshake (for example a stub "Cipher is (NONE)" line) and make success and failure easy to confuse, -brief is purpose-built to report the negotiated protocol, cipher, and any handshake error clearly in one short summary. If the server does not support TLS 1.2, the connection fails and the summary shows the handshake error instead of a negotiated protocol/cipher. Performs an external network connection; requires openssl; reveals only protocol and cipher negotiation details, no private key or other sensitive certificate content.
echo | openssl s_client -connect example.com:443 -servername example.com -tls1_2 -brief 2>&1 -
Nginx Bash
Validate Nginx configuration
Tests the Nginx configuration files for syntax errors without reloading the service. Requires appropriate permissions.
nginx -t -
Python Bash
Benchmark a small snippet of Python code
Runs the given expression repeatedly and reports the average execution time, using the standard library timeit module. Useful for comparing the performance of small code snippets; has no side effects beyond CPU time.
python -m timeit "sum(range(1000))" -
Python Bash
Check a script for syntax errors by compiling it
Compiles the given Python file to bytecode without executing it, which is a quick way to check for syntax errors. Replace example.py with the path to an actual, already existing file; writes a compiled .pyc file into a __pycache__ subdirectory next to the source file, creating that directory if it does not already exist.
python -m py_compile example.py -
Python Bash
Check installed packages for dependency conflicts
Verifies that all installed packages have their required dependencies satisfied and reports any version conflicts. Read-only; does not install, upgrade, or remove anything.
python -m pip check -
Python Bash
Check whether a requirements file would install cleanly
Resolves the dependencies listed in requirements.txt and reports whether they could be installed, without actually installing, upgrading, or removing any of the target packages. Requires a requirements.txt file in the current directory and pip 22.2 or later for the --dry-run flag. It can still download package files to resolve versions and build metadata, write to pip's local cache directory, and run package build steps as needed to determine compatibility.
python -m pip install --dry-run -r requirements.txt -
Python Bash
Check whether a specific module can be imported
Uses importlib.util.find_spec to check whether the named module (json in this example) can be located on the import search path, without actually importing or executing it; prints the module's spec if found, otherwise None. A found spec only means a matching file or package exists at an importable location; it does not guarantee that importing the module will actually succeed, since the module's own code could still fail during import (e.g. a syntax error or a missing dependency it tries to import internally). Replace json with the name of any other module to check it instead. Read-only and much faster than scanning every importable module.
python -c "import importlib.util; print(importlib.util.find_spec('json'))" -
Python Python
Check whether a virtual environment is active
Compares sys.prefix with sys.base_prefix in the running interpreter; prints True if a virtual environment is currently active, otherwise False. Read-only, uses only the standard library.
import sys; print(sys.prefix != sys.base_prefix) -
Python Bash
Create a new JSON file without overwriting an existing one
Creates a file named example.json in the current directory containing a small, indented JSON document, using only the standard library json and pathlib modules. Opens the file in exclusive creation mode ('x'), so the command fails with a FileExistsError and does not touch the file's contents if example.json already exists in the current directory.
python -c "import json, pathlib; f = pathlib.Path('example.json').open('x'); json.dump({'example': True}, f, indent=2); f.close()" -
Python Bash
Create a virtual environment
Creates an isolated Python virtual environment in a new .venv folder in the current directory, with its own interpreter and pip. Available since Python 3.3. If .venv already exists, Python's venv module reuses that directory instead of failing: it recreates the interpreter links/copies, activation scripts, and pyvenv.cfg, and reinstalls pip unless --without-pip is given, but it does not delete unrelated files or already-installed packages unless --clear is also passed; mixing this with an existing environment built from a different Python version can leave it in an inconsistent state.
python -m venv .venv -
Python Bash
Debug a script interactively with pdb
Launches the standard library debugger and starts executing the given script under its control, stopping before the first line so breakpoints and stepping commands can be used. Replace example.py with the path to an actual, already existing script; this opens an interactive debugging prompt and does not return control until the session is exited by entering continue or quit.
python -m pdb example.py -
Python Bash
Discover and run unittest test cases
Automatically finds and runs test files in the current directory tree using the standard library unittest framework, printing verbose results. Requires test files following unittest's discovery naming convention (test*.py by default); actual side effects depend entirely on what the discovered tests do.
python -m unittest discover -v -
Python Bash
Inspect pip cache usage
Show locations, sizes and entry counts of the configured pip cache without clearing it. The cache may be shared across Python environments.
python -m pip cache info -
Python Bash
Inspect Python source tokens
Print lexical tokens from a syntactically valid example.py without executing the source code. Replace the filename.
python -m tokenize example.py -
Python Bash
List a TAR archive
List the contents of example.tar with Python's standard library without extracting files. Replace the archive path.
python -m tarfile -l example.tar -
Python Bash
List a ZIP archive
List the contents of example.zip with Python's standard library without extracting files. Replace the archive path.
python -m zipfile -l example.zip -
Python Python
List currently loaded modules in this session
Shows the names of all modules already imported into the running interpreter session, sorted alphabetically. This differs from installed packages: it only reflects what has actually been imported so far, not everything available. Read-only.
import sys; print(sorted(sys.modules.keys())) -
Python Bash
List installed packages with available updates
Checks every installed package against PyPI and lists those with a newer version available. Requires a working internet connection and may take a moment; does not install or change anything.
python -m pip list --outdated -
Python Bash
List installed Python packages
Lists installed Python packages and their versions in the active environment. Requires pip.
python -m pip list -
Python Python
Parse a JSON string and read a value
Parses a small JSON string into a Python dictionary using the standard library json module and prints one of its values. Self-contained example; does not read or write any file.
import json; data = json.loads('{"example": true}'); print(data["example"]) -
Python Bash
Print a text calendar for the current year
Uses the standard library calendar module to print a full-year text calendar for the current calendar year, as determined by the system clock when the command runs. Pass an explicit year as an argument, e.g. python -m calendar 2027, to print a different year instead. Read-only, output only.
python -m calendar -
Python Bash
Profile a script's execution time by function
Runs the given script under the standard library cProfile profiler and prints a report of time spent in each function, sorted by cumulative time. Replace example.py with the path to an actual, already existing script; this actually executes that script, so any side effects it has will occur as normal.
python -m cProfile -s cumulative example.py -
Python Bash
Profile how long each import takes
Runs the given code with the importtime flag, printing a breakdown of how much time each imported module took to load, including its dependencies. Available since Python 3.7; read-only, no side effects beyond the import itself.
python -X importtime -c "import json" -
Python Bash
Run doctest examples embedded in a module
Executes the interactive examples found in the docstrings of the given file and reports whether their output matches, with verbose details. Replace example.py with the path to an actual Python file containing doctest-style examples in its docstrings; the file must already exist. Has no effect on files without such examples.
python -m doctest -v example.py -
Python Bash
Serve a local directory over HTTP
Starts a simple HTTP server using the standard library http.server module, serving only the files inside a subdirectory named public (relative to the current directory), bound exclusively to the local machine (127.0.0.1) on port 8000. Requires that a public directory already exists in the current directory; create one first if needed. Runs in the foreground until stopped with Ctrl+C and does not modify any files, but does make the public directory's contents accessible via HTTP to anyone on the local machine while it runs. This built-in server is intended for local testing only and is not suitable for production use.
python -m http.server 8000 --bind 127.0.0.1 --directory public -
Python Bash
Show metadata for an installed package
Prints version, location, and dependency metadata for the named package. Uses pip itself as the example here because it is commonly available in most Python installations, though not guaranteed: some Linux distributions ship a base python3 package without pip (requiring a separate OS package), virtual environments can be created with --without-pip, and minimal or embeddable Python builds may omit it entirely. Replace pip with the name of any other installed package, such as django, to inspect it instead. Fails with a non-zero exit code if the given package is not installed. Read-only.
python -m pip show pip -
Python Bash
Show Python installation and site-packages paths
Prints the module search path (sys.path), the site-packages directories, and whether per-user site-packages are enabled. Read-only, standard library only.
python -m site -
Python Bash
Show Python version
Prints the version of the Python interpreter available as `python` on the PATH.
python --version -
Python Python
Show the active Python interpreter path
Prints the full path of the Python executable currently running this session. Useful for confirming that the expected interpreter, such as one inside a virtual environment, is actually active. Read-only.
import sys; print(sys.executable) -
Python Bash
Start the local Python documentation browser
Starts a local documentation server and attempts to open it in a browser; opening a browser may fail on a headless server. When documenting modules, pydoc may import Python modules, which can execute their module-level code and cause side effects. Do not assume this command is read-only.
python -m pydoc -b -
Python Bash
Validate and pretty-print a JSON file
Parses the given file as JSON and prints it reformatted with indentation, or reports a syntax error with the exact position if the file is not valid JSON. Replace example.json with the path to an actual, already existing file; prints to standard output only and does not modify the input file.
python -m json.tool example.json -
SQL SQL
Compare MySQL account identities
Compare the authenticated privilege account with the connection identity in a direct MySQL session. Do not share account details publicly.
SELECT CURRENT_USER(), USER(); -
SQL SQL
Compare MySQL time-zone settings
Read the session and global MySQL time-zone settings without changing them. SYSTEM refers to the server's system time zone.
SELECT @@session.time_zone, @@global.time_zone; -
SQL SQL
Count admin log entries per content type via an inner join
Joins django_admin_log to django_content_type on the real foreign key content_type_id, then groups by app and model name to show how many admin actions were recorded per model, without exposing any individual log message or username. Requires both Django system tables (django_admin_log, django_content_type) to exist and that at least one admin action has been logged to return rows; read-only.
SELECT ct.app_label, ct.model, COUNT(*) AS log_entries FROM django_admin_log AS log JOIN django_content_type AS ct ON log.content_type_id = ct.id GROUP BY ct.app_label, ct.model; -
SQL SQL
Count how many commands are currently published
Returns a single number: the total count of rows in website_command where is_published is true. Read-only; a very cheap query at this table size and a common building block for dashboards or health checks.
SELECT COUNT(*) FROM website_command WHERE is_published = 1; -
SQL SQL
Count how many commands exist per category
Groups all rows in website_command by category and counts how many commands fall into each one, returning one summary row per category. Read-only; at this table size the grouping is effectively instantaneous.
SELECT category, COUNT(*) AS command_count FROM website_command GROUP BY category; -
SQL SQL
Count how many distinct categories are in use
Combines COUNT with DISTINCT to return a single number representing how many different category values appear in website_command, rather than the total row count. Read-only; equivalent behavior in MySQL and MariaDB.
SELECT COUNT(DISTINCT category) FROM website_command; -
SQL SQL
Fetch one page of commands using LIMIT and OFFSET
Returns titles sorted alphabetically, skipping the first 20 matching rows and returning the next 10, simulating page 3 of a 10-item-per-page listing. Read-only; OFFSET-based pagination re-scans skipped rows on each call, so it can become slow on very large tables, though this is not a concern at the current table size.
SELECT title_en FROM website_command ORDER BY title_en LIMIT 10 OFFSET 20; -
SQL SQL
Find categories that contain more than one command
Groups commands by category and then uses HAVING to keep only the groups whose count exceeds 1, filtering on the aggregated result rather than on individual rows (which WHERE cannot do). Read-only; functionally equivalent in MySQL and MariaDB.
SELECT category, COUNT(*) AS command_count FROM website_command GROUP BY category HAVING COUNT(*) > 1; -
SQL SQL
Find commands whose command text starts with 'git '
Uses a LIKE pattern with a trailing % wildcard to match any command_text starting with the literal prefix "git ", returning the matching titles. Read-only; command_text currently has no secondary index at all (only the table's primary key on id exists), so this query always performs a full table scan regardless of wildcard position. A trailing-wildcard pattern like this one has a fixed prefix the engine could seek on if a suitable index were added later, unlike a leading wildcard (e.g. '%git%'), where no fixed prefix exists to seek on, so every row would still need to be examined even if an index existed.
SELECT title_en FROM website_command WHERE command_text LIKE 'git %'; -
SQL SQL
Find commands whose title contains the word 'static'
Uses a LIKE pattern with wildcards on both sides to match title_en values containing the substring "static" anywhere, such as commands about static files. Read-only; title_en currently has no secondary index at all (only the table's primary key on id exists), so this query already performs a full table scan today. Even if an index on title_en were added later, this particular pattern has no fixed prefix for the engine to seek on, so every row's value would still need to be examined to evaluate it, unlike a trailing-wildcard pattern (e.g. 'static%'), which has a fixed prefix an index could narrow a search on.
SELECT title_en FROM website_command WHERE title_en LIKE '%static%'; -
SQL SQL
Find content types that have no recorded admin log entries
Uses a LEFT JOIN from django_content_type to django_admin_log followed by a WHERE log.id IS NULL filter (an anti-join) to list every registered content type that has never had an admin action logged against it. Requires both Django system tables to exist; read-only.
SELECT ct.app_label, ct.model FROM django_content_type AS ct LEFT JOIN django_admin_log AS log ON log.content_type_id = ct.id WHERE log.id IS NULL; -
SQL SQL
Inspect the current MySQL account's grants
Show grants and assigned roles for the current MySQL account. This does not expand all role privileges; keep the output private.
SHOW GRANTS FOR CURRENT_USER; -
SQL SQL
Inspect the session SQL mode
Read the current MySQL session's SQL mode, including strict-mode flags, without changing server or session settings.
SELECT @@session.sql_mode; -
SQL SQL
List all commands ordered from newest to oldest
Returns every command's title and creation timestamp, sorted descending by created_at so the most recently added commands appear first. Read-only; sorting a small table like this has negligible cost, but would benefit from an index on created_at on much larger tables.
SELECT title_en, created_at FROM website_command ORDER BY created_at DESC; -
SQL SQL
List each distinct category currently in use
Returns each unique value found in the category column, with duplicates removed, regardless of how many commands share that category. Read-only; the engine must internally group or sort rows to remove duplicates, which is inexpensive at this table's size.
SELECT DISTINCT category FROM website_command; -
SQL SQL
List every table in the current database with its storage engine
Queries the standard INFORMATION_SCHEMA.TABLES view, filtered to the currently selected database, to list every table together with its storage engine (typically InnoDB for this project) and an approximate row count. Read-only; TABLE_ROWS is an estimate for InnoDB tables, not an exact count. Supported identically by MySQL and MariaDB.
SELECT TABLE_NAME, ENGINE, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE(); -
SQL SQL
List MySQL database tables
Lists the tables in the currently selected MySQL database. Requires an active database connection and a selected database.
SHOW TABLES; -
SQL SQL
List the columns of website_command via INFORMATION_SCHEMA
Queries INFORMATION_SCHEMA.COLUMNS for the website_command table, returning each column's name, data type, and whether it allows NULL, in their original definition order. Produces the same underlying information as DESCRIBE, but as an ordinary queryable result set that can be filtered or joined further. Read-only; supported identically by MySQL and MariaDB.
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'website_command' ORDER BY ORDINAL_POSITION; -
SQL SQL
List the titles of all published commands
Filters website_command down to rows where is_published is true (stored as 1 in MySQL/MariaDB's tinyint(1) representation of BooleanField) and returns only their English titles. Read-only; result size depends on how many commands are currently published.
SELECT title_en FROM website_command WHERE is_published = 1; -
SQL SQL
Select the title, category, and shell of every command
Retrieves the English title, category, and shell columns for every row in website_command, without any filtering. Read-only; returns one row per stored command, including unpublished drafts; no special privileges beyond SELECT on the table.
SELECT title_en, category, shell FROM website_command; -
SQL SQL
Show all indexes defined on the website_command table
Lists every index on website_command, including the primary key, with details such as the indexed column, uniqueness, and cardinality estimate. Read-only; requires the table to exist. Currently the Command model defines no explicit secondary indexes, so only the primary key index on id is expected to appear.
SHOW INDEX FROM website_command; -
SQL SQL
Show MySQL server version
Returns the version string of the connected MySQL server.
SELECT VERSION(); -
SQL SQL
Show the character set and collation of the current database
Reads the character_set_database and collation_database session system variables, showing the default character encoding and sort order configured for the current database. Read-only; identical syntax in MySQL and MariaDB; requires no special privileges.
SELECT @@character_set_database, @@collation_database; -
SQL SQL
Show the column structure of the website_command table
Lists every column of the website_command table (the table backing the Command model of this project) along with its data type, nullability, key, default, and extra attributes. Requires the table to exist and SELECT-level visibility into its structure; read-only, negligible performance impact. DESCRIBE is a MySQL/MariaDB-specific shorthand for SHOW COLUMNS FROM.
DESCRIBE website_command; -
SQL SQL
Show the execution plan for a filtered SELECT
Shows how the database would execute the given SELECT (e.g. full table scan vs. index lookup, estimated rows examined) without actually running it as a normal query and returning its data rows. Read-only and does not execute the underlying query's result retrieval; distinct from EXPLAIN ANALYZE, which does execute it and is intentionally not used here. On this small, unindexed table, the plan will typically show a full table scan.
EXPLAIN SELECT * FROM website_command WHERE category = 'linux'; -
SQL SQL
Show the full CREATE TABLE statement of website_command
Returns the complete CREATE TABLE statement that would recreate the website_command table, including column definitions, keys, storage engine, and character set. Useful for understanding the table's real on-disk structure beyond what the Django model shows. Read-only; requires the table to exist; supported identically by MySQL and MariaDB.
SHOW CREATE TABLE website_command; -
SQL SQL
Show the name of the currently selected database
Returns the name of the database currently selected for the connection (or NULL if none is selected). Works identically in MySQL and MariaDB; read-only, requires no special privileges, and has negligible performance impact.
SELECT DATABASE(); -
SQL SQL
Show the server-wide configured maximum number of connections
Reads the max_connections server configuration variable using the GLOBAL scope, showing the upper limit on simultaneous client connections the whole server will accept. Read-only; available without special privileges; useful together with Threads_connected to judge how close the server is to its connection limit.
SHOW GLOBAL VARIABLES LIKE 'max_connections'; -
SQL SQL
Show the server-wide number of open connections
Reads the Threads_connected server status variable using the GLOBAL scope, showing how many client connections are currently open across the whole server rather than just the current session. Read-only; available to any connected user without special privileges; a lightweight diagnostic for spotting unexpectedly high connection counts.
SHOW GLOBAL STATUS LIKE 'Threads_connected'; -
Windows PowerShell
Calculate a file's SHA-256 hash
Hash example.zip without modifying it. Replace the path and compare the result with a trusted reference.
Get-FileHash -Algorithm SHA256 -LiteralPath .\example.zip -
Windows PowerShell
Inspect a script's Authenticode signature
Inspect the signature status of example.ps1 on Windows without executing it. A valid signature is not a safety guarantee.
Get-AuthenticodeSignature -LiteralPath .\example.ps1 -
Windows PowerShell
List all available PowerShell modules
Shows every PowerShell module installed on the system that can be imported, without actually loading them. Useful for checking whether a required module is present.
Get-Module -ListAvailable -
Windows PowerShell
List installed Windows hotfixes
Shows the installed Windows updates (hotfixes) with their KB identifier and installation date. Get-HotFix is a thin wrapper around the Win32_QuickFixEngineering WMI class, which, per Microsoft's own documentation, returns only updates supplied through Component Based Servicing (CBS); updates installed via the Windows Installer (MSI) or delivered through the Windows Update site are not returned by this class, so this list is not a complete update history on modern Windows. For the full history, use the Settings app under Windows Update > Update history.
Get-HotFix -
Windows PowerShell
List listening TCP ports with owning processes
Shows TCP ports in the listening state together with the numeric process ID (OwningProcess) of the process that opened each one. Part of the built-in NetTCPIP module (Windows 8/Server 2012 or later). Use Get-Process with that ID to look up the process name.
Get-NetTCPConnection -State Listen -
Windows PowerShell
List local user accounts
Shows the local user accounts on this computer, including whether each one is enabled. Requires the LocalAccounts module (built into Windows 10/11 and Windows Server 2016 or later) and is not available on domain controllers.
Get-LocalUser -
Windows PowerShell
List members of the local Administrators group
Shows which users and groups have been added to the local Administrators group, identified by its well-known SID (S-1-5-32-544) so the command works regardless of the system's display language, unlike specifying the localized group name. Requires the LocalAccounts module and is not available on domain controllers.
Get-LocalGroupMember -SID 'S-1-5-32-544' -
Windows PowerShell
List PowerShell drives
Shows all PowerShell drives, including filesystem drive letters and provider drives such as Env: and HKLM:, along with free space where applicable.
Get-PSDrive -
Windows PowerShell
List running processes
Lists the processes currently running on the local computer, including process ID and resource usage.
Get-Process -
Windows PowerShell
List scheduled tasks
Shows all scheduled tasks defined on the system along with their current state (ready, running, or disabled). Part of the built-in ScheduledTasks module (Windows 8/Server 2012 or later).
Get-ScheduledTask -
Windows PowerShell
List volumes, drive letters, and free space
Shows all storage volumes with their drive letter, file system type, health status, and free space. Part of the built-in Storage module (Windows 8/Server 2012 or later).
Get-Volume -
Windows PowerShell
List Windows services
Lists Windows services on the local computer along with their current status (running, stopped, etc.).
Get-Service -
Windows PowerShell
Query DNS records for a domain
Looks up the DNS records for the given domain and shows the resolved IP addresses. Part of the built-in DnsClient module (Windows 8/Server 2012 or later).
Resolve-DnsName example.com -
Windows PowerShell
Read operating-system details through CIM
Read the local Windows operating-system instance, including version and last boot time. No remote session is requested.
Get-CimInstance -ClassName Win32_OperatingSystem -
Windows PowerShell
Show a PowerShell command's syntax
Show the available parameter sets for Get-Process without running that command.
Get-Command -Name Get-Process -Syntax -
Windows PowerShell
Show detailed system and OS information
Displays detailed information about the operating system, BIOS, and hardware. Available in Windows PowerShell 5.1 and PowerShell on Windows 10, 11, and Windows Server 2016 or later; the first run can take a few seconds.
Get-ComputerInfo -
Windows PowerShell
Show error-level entries from the System event log
Filters the Windows System event log to the 20 most recent entries at the Error level. Reading some logs may require administrative permissions depending on system configuration.
Get-WinEvent -FilterHashtable @{LogName='System'; Level=2} -MaxEvents 20 -
Windows PowerShell
Show IP addresses assigned to network interfaces
Lists the IPv4 and IPv6 addresses currently assigned to each network interface. Part of the built-in NetTCPIP module (Windows 8/Server 2012 or later).
Get-NetIPAddress -
Windows PowerShell
Show last and next run times for scheduled tasks
Lists every scheduled task together with its last run time, last result, and next scheduled run time. This is a pipeline of two cmdlets (Get-ScheduledTask, Get-ScheduledTaskInfo), not a single command. Part of the built-in ScheduledTasks module (Windows 8/Server 2012 or later).
Get-ScheduledTask | Get-ScheduledTaskInfo -
Windows PowerShell
Show network adapter status
Lists network adapters with their link speed and connection status (up or down). Part of the built-in NetAdapter module (Windows 8/Server 2012 or later).
Get-NetAdapter -
Windows PowerShell
Show NTFS permissions for a path
Displays the owner and access control list (NTFS permissions) for the given file or folder path, here the root of the C: drive.
Get-Acl C:\ -
Windows PowerShell
Show physical disk inventory and health
Lists the physical disks attached to the system with their media type, size, and health status. Part of the built-in Storage module (Windows 8/Server 2012 or later).
Get-PhysicalDisk -
Windows PowerShell
Show the current user's identity and privileges
Prints the current user name, group memberships, and assigned privileges. This is the built-in whoami.exe tool, not a PowerShell cmdlet, but works identically in every PowerShell session.
whoami /all -
Windows PowerShell
Show the IP routing table
Displays the system's current IP routing table, including the default route. Part of the built-in NetTCPIP module (Windows 8/Server 2012 or later).
Get-NetRoute -
Windows PowerShell
Show the most recent System event log entries
Displays the 20 most recent entries from the Windows System event log. Reading some logs may require administrative permissions depending on system configuration.
Get-WinEvent -LogName System -MaxEvents 20 -
Windows PowerShell
Show the PowerShell script execution policy
Lists the script execution policy configured at each scope (process, user, machine). This setting is a safety feature that helps prevent scripts from running unintentionally; it is not a security boundary and can be overridden, for example with -ExecutionPolicy Bypass.
Get-ExecutionPolicy -List -
Windows PowerShell
Show the PowerShell version and edition
Prints the PowerShell version, edition (Desktop or Core), and compatible .NET version. Useful for confirming whether a script is running under Windows PowerShell 5.1 or PowerShell 7.
$PSVersionTable -
Windows PowerShell
Show the ten largest files in the user profile
Searches the current user's profile folder recursively and lists the ten largest files by size. This is a pipeline of three cmdlets (Get-ChildItem, Sort-Object, Select-Object), not a single command, and may take a moment on profiles with many files.
Get-ChildItem -Path $env:USERPROFILE -Recurse -File -ErrorAction SilentlyContinue | Sort-Object Length -Descending | Select-Object -First 10 FullName, Length -
Windows PowerShell
Test connectivity to a host and port
Checks whether a TCP connection to the given host and port succeeds, and reports basic route information. Part of the built-in NetTCPIP module (Windows 8/Server 2012 or later).
Test-NetConnection -ComputerName example.com -Port 443