The Basics of Linux

First we will connect to our target via SSH.

SSH command follows the format of SSH USER@TARGET.

Then we use the password.

To find the machine hardware we use “uname -m” you can get a list of all options for uname by using “uname –help”

To find the path to the users home directory we use “pwd”. I associate this with “print working directory”

If you want to find the path to the users mail or other folders you can use the “locate” command.

Here we can see it is located at /var/mail. A simpler way to find this is using “echo”.

Let’s say you want to find the shell that is specified for the user. For this we use “echo” again.

To find the kernel version install on the system we reuse “uname”.

What about finding which interface has an MTU set to 1500? “ifconfig” will help us here.

How will you find the name of a users hidden “history” file in their home directory?

What if you want to find the index number of a file in a directory?
In this case we will look for the index number of a file called “sudoers” found in the “/etc” directory.

Clearly, there are too many results to fit on the screen so we do the following:

If we want to find the last modified file in any directory we can use the “ls” command with different options.

Let’s find the inode number of a file.

Filtering for a file created after a certain date and between a range of sizes.

Comments

Leave a Reply

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading