System Information

Here is a list of tools that can be used to get further information on a Linux operating system. Most of them should be available on the system by default.

uname – displays system information about the Linux kernel, such as the operating system name, release version, and processor architecture. For example, to display the system’s operating system name and kernel version, use:

uname -a

whoami – display the current username for both Linux and Windows.

id – The id command is a Linux/Unix command that is used to display the user and group information for the current user or for a specific user or group.

When you run the id command without any options, it will display the user ID (UID), group ID (GID), and the groups that the current user belongs to. For example:

$ id
uid=1000(username) gid=1000(username) groups=1000(username),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare)

Here, uid=1000 indicates the user ID of the current user, gid=1000 indicates the primary group ID of the current user, and groups=1000(username),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare) lists the additional groups that the user belongs to.

You can also use the id command to display the user and group information for a specific user or group by passing the username or group name as an argument. For example:

$ id someuser
uid=1001(someuser) gid=1001(someuser) groups=1001(someuser),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare)

$ id somegroup
uid=1002(somegroup) gid=1002(somegroup) groups=1002(somegroup),1003(someothergroup),1004(someadditionalgroup)

In addition to the default output, the id command also supports a number of options that can be used to customize the output or to display additional information. You can see the available options and their descriptions by running man id.

hostname – sets or prints the name of current host system.

pwd – returns working directory name.

ifconfig – is a used to configure and display information about network interfaces.

ip – is a powerful and versatile command-line tool for network configuration in Linux/Unix operating systems. It is used to configure and display information about network interfaces, routing tables, network address translation, and many other networking-related tasks.

neststat – used to display information about the network connections and network statistics. It can provide details on network interfaces, routing tables, open network connections, and much more. It can be used to diagnose and troubleshoot network problems, monitor network performance, and much more. Some common options for the netstat command include:

-a to display all active connections (both listening and non-listening).

-n to display numerical IP addresses instead of hostnames.

-p to show the process or program associated with each connection.

-r to display the kernel routing table.

-l display a list of all listening TCP and UDP connections

-atp display a list of all active TCP connections, including the remote address and port, the local address and port, and the process ID (PID) of the associated process.

-i display a summary of network interface statistics, including the number of bytes and packets sent and received

-r display the kernel routing table, including information about the destination, gateway, and netmask of each route.

ss – used to display detailed information about network sockets, including TCP, UDP, and UNIX domain sockets. It is an alternative to the more traditional netstat command and provides more detailed and up-to-date information on active connections and network statistics. Some common options for the ss command include:

-a to display all active connections (both listening and non-listening).

-n to display numerical IP addresses instead of hostnames.

-p to show the process or program associated with each connection.

-t to show only TCP connections.

-u to show only UDP connections.

-x to show only UNIX domain sockets.

-e to display extended information about each connection, including the user and group ID of the process.

who – print information about users who are currently logged in.

env – used to display or set environment variables for a particular command or shell. Environment variables are special values that are available to any program or script running on the system, and they can be used to customize the behavior of programs, define system-wide settings, or pass information between programs. Some common options for the env command include:

-i to start with an empty environment.

-u to unset a particular environment variable.

-v to display the version of env.

To set a new environment variable for a particular command or script, use the following command:

env VAR=value COMMAND


For example, to set the MY_VAR environment variable to hello and run the echo command:

env MY_VAR=hello echo $MY_VAR

To unset a particular environment variable, use the following command:

env -u VAR COMMAND

For example, to unset the MY_VAR environment variable and run the echo command:

env -u MY_VAR echo $MY_VAR


In addition to these options, env has many other advanced options and uses, such as executing a command with a modified environment, setting environment variables from a file, and much more. You can learn more about these options and their usage by reading the env man pages.

lsb_release – displays information about the Linux distribution, including its name, release number, and code name. For example, to display the distribution name and version, type:

lsb_release -a

cat /proc/cpuinfo – displays detailed information about the system’s CPU, including the number of processors, clock speed, and cache size.

free -m – displays information about the system’s memory usage, including the total amount of memory, the amount of free memory, and the amount of memory used by the system’s processes.

df -h – displays information about the system’s disk usage, including the amount of disk space used and available on each mounted filesystem.

lspci – displays information about the system’s PCI devices, including the device ID, vendor, and subsystem ID.

lsusb – displays information about the system’s USB devices, including the device ID, vendor, and product ID.

lsblk – used to list information about all available block devices on a system, such as hard drives, USB drives, optical drives, and so on. It provides a detailed view of the block devices and their associated attributes, such as the device name, size, and mount point.

These commands can be very useful for troubleshooting and system administration tasks, as well as for general system monitoring and maintenance.

Leave a Reply

Your email address will not be published. Required fields are marked *