Security+ Training Online | Lab | Linux Terminal (1/2)

kali linux terminal Apr 23, 2018

Yes! Now it's time to have some fun with Linux.

Today we're going to introduce to the world's most popular penetration testing and ethical hacking Linux distribution: Kali Linux. (pronounced "CAL - LEE")

Kali is the standard beloved by both white-hat hackers and evil attackers alike.  It offers a complete suite of attack tools that a competent hacker can use to attack and compromise systems and networks.

Today we're going to start things off with a basic introduction to the Linux terminal. You'll learn:

  • How to launch the terminal in Kali Linux (and how to get around)
  • Understanding the weird and wacky world of Linux case
  • Getting help on any Linux command (without needing Google)
  • Next week we'll look into using ping, ifconfig, ip, netstat and tracert,

Are you ready to jump in?  Let's do this baby!

How to launch the terminal in Kali Linux

Every cybersecurity professional needs to know how to navigate around the operating system from the command line.  So today we're going to start things off with the bare basics: launching the Linux terminal.

We'll be using Kali Linux in this training lesson but the material you learn today can be applied to almost any version of Linux... so don't panic. 

Alright, so the fastest way to launch the terminal is to simply right-click the Desktop and choose: 

"Open Terminal"

Navigating the Linux Terminal

Now they we're in the terminal we need to find our way around.  Once of your favorite command will quickly become print working directory "pwd".


Here, you can see I'm standing in a directory named "/root"

This is a quick way to find out where you are standing in the mysterious world of Linux.  You can then type cd and a folder name to move to different folders (it works the same way as Windows)

cd /root/Desktop

Then to view the files and folders in the directory we can list them with "ls":


Remember this: ls is the Linux equivalent of dir

Understanding Linux Commands

Alright, so now we know a little bit about the command line but there's one really important fact you need to know:

Linux commands are case-sensitive.

This means, typing "pwd" is different than "PWD". 

In other words, in Linux case matters.  Typing the word in uppercase is completely different than typing that same word in lowercase. 

The other thing you should keep in mind is that you can easily find out how to use almost any Linux command by tacking on a -h or --help.

For example, let's say you wanted to use macchanger to change the layer 2 MAC address of your NIC.  If you type the command macchanger by itself it gives you a clue what to do.  


Ah, so now we see that adding --help should get us going.

macchanger --help

So to change our MAC address all we need to do is to examine the command line syntax:

macchanger [options] device

Notice the options that begin with the -m.  It's telling us if we type:

macchanger with the "-m" (say, "tack 'm') or if we type:

tack tack mac equals option then we can enter the MAC in the following format: XX:XX:XX:XX:XX:XX.  We just need to replace each "X" with the hexadecimal character of our choosing.

-m, --mac=XX:XX:XX:XX:XX:XX

I hope this is making sense.

So let's see what MAC addresses are available for us.  We could pick anything or we could try to impersonate a known vendor.  The help file tells us the "-l" option lists known vendors.  Let's see what this tells us:

macchanger -l

Okay there's a lot here

Instead of scrolling through that voluminous list looking for a MAC address to yank, let's use our command line skills to filter through the output.

Notice, when we typed macchanger --help the help file said we could type:

macchanger --list[=keyword]

So let's see if we can find all the Apple vendor ID's:

macchanger --list=Apple

w00t - look at that - so now we are one step closer to spoofing our MAC address.  Let's see if we can become that Apple Wireless Airport card.

macchanger --mac=00:30:65:00:00:01

Now let's see if we actually updated our MAC with ifconfig:


Nope - hmm, so we tried to change our MAC to 00:30:65:00:00:01, the first six characters denoting the vendor ID, but when we ran ifconfig it still shows our real MAC: 00:0c:29:79:4f:b5

It looks like it didn't work.

Let's go back to the command line syntax to see if we can figure out what we did wrong.  When we type:

macchanger --help

The syntax says we should type:

Usage: macchanger [options] device

So that's the problem we didn't enter the device

Well, what's the device?  It's the name of the interface, the network interface card, that you want macchanger to affect.  So let's put in eth0, which is the name of our main NIC.

macchanger --mac=00:30:65:00:00:01 eth0

BAM! Now when we type ifconfig we can see it worked. 

So now all packets sent from our computer on the network will appear to originate from an Apple wireless access point. We've effectively masked our source MAC address using macchanger.

Do you see how this stuff works?  You don't need Google or anything like that to learn and use Linux.  You just need to know how to use the help system.

Coming Up

Alright so that's all you need to know today.  Next Monday we're going to dig into:

  • ping
  • ifconfig vs the newer ip command
  • netstat
  • tracert
  • arp

Get ready because it's going to be a jam packed lecture.  These are all the commands you need to pass the SY0-501 exam.  Also, if you want to go deeper in your studies consider signing up for our Security+ training course.  It's a hands on course with in-depth videos showing you network fundamentals you'll need to pass the exam.

In the meantime, here's a video walk-through of this entire lecture! 

If you have any questions leave a comment!  Thanks.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sed sapien quam. Sed dapibus est id enim facilisis, at posuere turpis adipiscing. Quisque sit amet dui dui.

Call To Action

Stay connected with news and updates!

Join our mailing list to receive the latest news and updates from our team.
Don't worry, your information will not be shared.

We hate SPAM. We will never sell your information, for any reason.