This is a walkthrough of the System Information section from the Linux Fundamentals module on HackTheBox Academy.

Tip: It is highly recommended that you attempt the questions yourself first. Use this write-up only when you're stuck or to understand the reasoning behind the commands.

Connecting to the Lab

In this section, we need to connect to the HTB Academy lab environment.

  1. Scroll down in the section and download the VPN configuration file (academy-regular.ovpn).
None

2. Connect using OpenVPN with the following command:

openvpn academy-regular.ovpn
None

Once connected, we will SSH into the target machine to answer the questions.

SSH Login:

  • Username: htb-student
  • Password: HTB_@cademy_stdnt! (as shown in the module)
None
None

Questions & Solutions

Question 1

Find out the machine hardware name and submit it as the answer.

We can use the uname command to retrieve system information.

  • uname — all → prints all available information
  • uname -m → prints only the machine hardware name (architecture)
uname -m

Answer: x86_64

None

Question 2 [+1]

What is the path to htb-student's home directory?

The easiest way is to use the pwd (Print Working Directory) command after logging in.

pwd

Answer: /home/htb-student

None

Question 3

What is the path to the htb-student's mail?

We can find this by checking the MAIL environment variable:

env | grep MAIL

Answer: /var/mail/htb-student

None

Question 4

Which shell is specified for the htb-student user?

Similarly, we can check the SHELL environment variable:

env | grep SHELL

Answer: /bin/bash

None

Question 5

Which kernel release is installed on the system? (Format: 1.22.3)

Use the uname command with the -r flag to display the kernel release:

uname -r

Answer: 4.15.0

None

Question 6 [+1]

What is the name of the network interface that has MTU set to 1500?

We can use the ifconfig command to view network interface details, including MTU (Maximum Transmission Unit).

ifconfig

Look for the interface where mtu 1500 is shown.

Answer: ens192

None

Key Takeaways from this Section

  • uname is a very useful command for quick system information (-m, -r, -a, etc.).
  • Environment variables like $SHELL and $MAIL can be inspected using env | grep.
  • pwd quickly tells you your current working directory.
  • ifconfig helps view network interface configuration (note: modern systems may prefer ip addr).

Understanding these basic commands builds a strong foundation for navigating and managing Linux systems effectively.