DEV Community

Msaghu
Msaghu

Posted on • Updated on

KALI LINUX: Common Commands that you should know : PART ONE

Resources


Books

  1. Linux Basics for Hackers Getting Started with Networking, Scripting and Security in Kali by Occupy the Web

YouTube

  1. Network Chuck

What is Linux?

Linux is a kernel that provides a way to link between the hardware and soft ware i.e. interfaces with our hardware such as the CPU, RAM, hard drive.
On top of the Linux kernel we then have the Operating Systems.
Remember that everything in Linux is a file i.e the commands, networks, device settings

Why use Linux?

  1. It is open-source.
  2. Linux is transparent.
  3. Linux offers granular control through the linux terminal.
  4. Most hacking tools are written for Linux.

Linux Distributions

  • Debian

  • CentOS

  • Arch

  • Redhat

  • Mint

  • Suse

For the purposes of this blog I will be using the Debian based Kali Linux.

Terms to be familiar with

Terminal - this is the Command Line interface shown by a tiny black box usually at the top left of the bar
Directory - this is the folder system in Linux and is mentioned to refer to folders, you can store files in directories
Binaries - these are executable files
Hydra - a Kali Linux tool to crack login/password pairs

Commands to know

  1. PART 1
  2. PART 2
  • pwd - present working directory; lists the contents of where you are in the terminal

  • ls - lists contents of your current working directory e.g
    ls -l to long list contents of a directory
    ls -la to long list contents of a directory plus their hidden files

  • cd - changes directory into where you want to go(can only go into a directory no files)
    e.g
    cd Downloads takes you to the Downloads directory
    _ cd .. _takes you back to the previous directory

  • clear - clears all the commands on your terminal

  • whoami - shows who we are logged in as

  • man - used to reference manual pages of a Linux tool/ command, scroll through with the arrows and opt out using q i.e.
    man hydra will give details about hydra

  • whatis - shows little information about a tool

  • locate - goes through your system to give all occurrences of that word(this is not the most efficient method) i.e
    locate hydra

  • whereis - goes through your system to find binaries

  • which - returns the locations of the binaries in the PATH variable i.e.
    which hydra

  • history - gives the last 1000 commands that had been run on the terminal

  • cat - can be used to store information in a file ,
    it can also show the information stored in the file,
    and can append more information to the existing file
    (to go back using CTRL D)
    i.e.
    cat > hackingskills
    I enjoy learning about Linux, do you?
    cat hackingskills
    shows = I enjoy learning about Hacking, do you?
    cat >> hackingskills
    Take 30mins everyday to learn about Linux

  • touch- used to create new files, can also be used to change details of an existing file i.e the time of creation

  • mkdir - used to make new directories

  • rmdir - used to remove directories

  • rm - this is one of the most powerful commands in Linux and can remove entire directories without backups, use it with caution

  • cp - creates a copy of an exiting file

  • mv - used to rename a file i.e.
    mv newfile newfile2

Top comments (0)