Skip to main content
XsiSec.com
HomeReposBlogProjectsPortfolio
© 2026 XsiSec.com
Security rules |security.txt
Updated 2026-08-15 · v1.0.0+2026-08-14.82f92cb · 82f92cb
← Back to overview
Security article

HTB Academy - System Information

HTB Academy - System Information: Command • HTB Academy • htb-academy, section-70

2022-09-154 tags
Tags

Linux System Information Commands

CommandDescription
whoamiDisplays the current username.
idDisplays the current user's identity, including user and group IDs.
hostnameDisplays or sets the name of the current host system.
unameDisplays basic information about the operating system and hardware.
pwdDisplays the current working directory.
ifconfigDisplays or configures network interfaces and network parameters.
ipDisplays or manages routes, network devices, interfaces, and tunnels.
netstatDisplays network connections, routing tables, and network statistics.
ssDisplays information about network sockets.
psDisplays information about running processes.
whoDisplays users currently logged in to the system.
envDisplays environment variables or runs a command with modified environment variables.
lsblkLists block devices.
lsusbLists connected USB devices.
lsofLists open files and the processes using them.
lspciLists connected PCI devices.

Count Installed Packages

Use the following command to count all installed Debian packages:

bash
dpkg-query -l | grep "^ii" | wc -l

Command Breakdown

CommandDescription
dpkg-query -lLists packages known to the Debian package manager.
grep "^ii"Filters the output to include only installed packages.
wc -lCounts the number of matching lines.
Navigate

In this post

  1. 01Linux System Information Commands
  2. 02Count Installed Packages
  3. 03Command Breakdown
Search
Explore

Popular tags

Browse all 30 tags

Comments

0 comments

No comments yet — be the first to comment.