Navigation and Efficient Linux Shell Mastery.


Efficient navigation is crucial for working in systems; employing various commands and tools optimizes directory and file management while experimenting aids in mastering Linux operations, enhancing shell proficiency.

We now know the topic of today's tasks in the training I'm currently going through. It's time to fire up the machines.

Alright, the first task. Let's see what awaits me now.

1. What is the name of the hidden "history" file in the htb-user's home directory?  

As we can see, my first step will be to check if I'm in the right directory. I can do this using the 'pwd' command.

Alright, I'm where I should be. Now, I need to find out where this 'history' file is hiding and what it's actually called. Normally, I'd check the contents of the directory by typing 'ls,' but okay - that command will only show me non-hidden files. And I need that one hidden file. Will 'ls -all' do the trick? Well, let's see...

So, a brief list of files contained in this directory appeared, and among them is indeed the '.....history' file, as I mentioned in the previous entry. I won't give away ready-made solutions, but surely, this is the icing on the cake.

2. The second task - What is the index number of the 'sudoers' file in the '/etc' directory?

Of course, it's located in the directory /home/htb-student, but I need to look into the /etc directory - so what should I use here? 'CD' should fit the bill.

So, how do I check the index number of the 'sudoers' file? I found two suitable options here.

- stat sudoers


ls -i sudoers

Entering the first command will give me a lot of detailed data, and among them, I'll see what I need. The second command - will result in a very modest output - but it's precisely that result that I need here.




Popular posts from this blog

Task Scheduling and System Services: A Theoretical Overview

Three tasks related to user management.

Working with Web Services.