How Linux does work ?

Linux files structure: All Linux versions provide with the same one. Today, we’re going to work with Gnack Track R6 virtual machine on VMWare Workstation Player v15.5 (Free). This will be the first tutorial for my upcoming Network penetration tests course.


Install Gnack Track on VMWare Player

The first step is to create your virtual machine with VMWare Player as follow.

You can specify the amount of memory allocated to this virtual machine by editing it. I usually use 2GB memory for virtual machines on Linux.

Then, you will decide how many processor cores do you want to use for this specific virtual machine. I usually use 4 cores as showed on the previous screenshots. We will also allocate 12 GB and use Gnack Track iso that we preciously downloaded.

Linux Discovery

First of all, you will need to launch your virtual machine on VMWare Player.

By default, Gnack Track will start on his command line version. We will learn around 12-15 commands during this tutorial and it will be easy to memorize them. We categorized them for this presentation and you will be able to have a look at it later.

Once Gnack Track starts, you can use a command in order to launch the graphic interface as below

root@root: ~# startx

The interface below is very similar to Windows and you will find some of the option from Microsoft OS.

Penetration is one of many Gnack Track options as such as :

  • Information Gathering
  • Network Mappings
  • Vulnerability Identification
  • Privilege Escalation
  • Maintaining Access

Linux Structure

As previously mentioned, Linux provides with its own files structure. By selecting “Computer” on the desktop, you will access to this File System. It should looks like the following screenshot.

Clicking on “etc” will give access to the configuration files, binaries can be found on “bin” which are representing all the commands anybody can use on Linux. Basically, this is how any file system looks like when using this OS.

Linux Commands

The first step will be to open the terminal. The icon can be found through the bar menu on top of your desktop. It will open a console as below.

We applied customized colors and Zoom In, it will be easier to see what’s happening on the screen.

Basic commands

ls command is a command-line utility for listing the contents of a directory or directories given to it via standard input. It writes results to standard output.

cd command is used to change the current directory (i.e., the directory in which the user is currently working) in Linux and other Unix-like operating systems.

pwd command is a command line utility for printing the current working directory. It will print the full system path of the current working directory to standard output. By default the pwd command ignores symlinks, although the full physical path of a current directory can be shown with an option.

Linux color code also indicates when it’s a folder (dark blue) or files (light blue).

whoami command is used both in Unix Operating System and as well as in Windows Operating System. It is basically the concatenation of the strings “who”,”am”,”i” as whoami.

Right now we are logged on with “root’ which is the account with the highest privileges. For the sake of security, we don’t usually use this account and we deactivate it since it represents a lack of security. If someone access to this account on a server, it will damage its security level. We do have the same approach on websites.

Network commands

ifconfig command can be used from the command line either to assign an address to a network interface or to configure or display the current network interface configuration information. The ifconfig command must be used at system startup to define the network address of each interface present on a machine.

Linux allows you to ask for another IP address by using command dhclient and a new one will be automatically requested.

Editing commands

As we do on MacOS and Windows, we will need to open or modify files by using Linux. We will also write code create new content so we must know how to modify a file. Linux provide with multiple editors but we will use nano (if you pass by this article, Linux Curator, don’t be mad).

Let’s clear the screen by using command “clear” and then, we’re checking which files are available for this quick test.

We decided to go to /etc/ repertory since we do have a lot of files there. We used command “cd etc/” to do so.

Then, we will edit the file called zlibc.conf by using the appropriate command. Keep in mind that in Linux, you don’t have to type the entire command, you can press “Tab” once you entered nano zlib and it will fulfill the rest by itself.

root@root:etc/# nano zlibc.conf

Then, we will be able to modify, comment, remove anything we want on this editor. When you’re done, you have to type “CTRL+X” in order to save your changes with “Yes” or “No” if you forget something / did a mistake, then, exit the file editor and that’s it.

Linux also provides with graphic editors if we’re not comfortable with command lines.

Navigation commands

Copying a file with drag and drop is feasible on Linux but you can also do it by using a command called “cp”.

cp command is a command-line utility for copying files and directories. It supports moving one or more files or folders with options for taking backups and preserving attributes.

To do so, you need to enter the full path of this copy. If you want to keep the same file destination name, you will add “.” after the path as follow:

root@root: /etc# cp /etc/zsh_command_not_found /bin/.

If you want to move a file instead of copy, you can also do it by using the command called “mv”.

The mv command is a command line utility that moves files or directories from one place to another . It supports moving single files, multiple files and directories. It can prompt before overwriting and has an option to only move files that are new than the destination.

root@root: /etc# mv /etc/zsh_command_not_found /bin/.

When using a specific command is not clear, Linux allows you to display help window by using the following command. Let’s try with nano:

root@root: /etc# nano --help

If you have any questions, you can comment this post or send me an email at and I will be happy to help or discuss.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.