HTB Academy Linux Fundamentals: Service and Process Management
This is a walkthrough of a Linux fundamentals Section(Service and Process Management) in HTB Academy. It is recommended that you do the…
This is a walkthrough of a Linux fundamentals Section(Service and Process Management) in HTB Academy. It is recommended that you do the module in HTB Academy to understand what is happening! (BTW IT’S FREE!)
In this section, we will use openvpn to connect to the HTB Academy network and then attempt the section. If you are unsure of how to connect to openvpn in HTB Academy, you can check this out:
Now, let’s get on with the section Questions:
First, we have to ssh into the machine:
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
[+0] Use the “systemctl” command to list all units of services and submit the unit name with the description “Load AppArmor profiles managed internally by snapd” as the answer.
First of all, the question states we have to use systemctl to list all units of services. If you have gone through the page of this section in the module, you would have come across this:
We will definitely be using this!
Let’s try the command out:
We obtained a list of services working on the machine. We could just go through each and every single one of the services and obtain the result like how I did below after scrolling through the list:
But this is not very efficient! We can easily make it a lot more efficient using grep! Look at what I did:
By simply using grep, we saved a lot of time very easily and solved the question with efficiency!