Kali Linux Command Lines Part 2 – Working with Directories

January 12, 2016 | Views: 58348

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

Hi! and welcome to Part 2: Kali Linux Command Line – Working with Directories

This module is a brief overview of the most common commands for working with directories, like:

pwd, cd, ls, mkdir and rmdir.

(Note : For Video Demo/Lab, on this part, you can follow this link : https://youtu.be/svXodC_eJls )


The Commands:

– pwd: the tool displays your current directory

– cd: we can change our current directory with the cd command

– ls: for listing the contents of current directory

– mkdir; for creating a new directory

– rmdir: for removing a directory


Symbols for Directories in Kali Linux:

Sign ‘~’ means Home Directory.

Sign ‘/’ means File System Directory

For ‘desktop folder’ in Kali Linux, we write it as ‘Desktop’ (notice capital D here)


Enroll today to access these FREE Cyber Security Courses now:

Executing the Commands:


means we’re in the home home folder


Write ‘cd /’

root@kali:~# cd /

means we changed directory from ~ to /


Write ‘ls’

root@kali:/# ls

means it will list/show the content of / directory


Make new folder ‘test’ in desktop. For that, execute following:

root@kali:/# cd ~

root@kali:~# cd Desktop

root@kali:~/Desktop# mkdir test


New folder, ‘test’ will be created on the desktop now. To change directory to ‘test’, use ‘cd test’, and to list the content ‘ls’:

root@kali:~/Desktop# cd test

root@kali:~/Desktop/test# ls


To know the working directory, we write ‘pwd’:

root@kali:~/Desktop/test# pwd

It will o/p ‘test’ in next line, because we’re in a ‘test’ folder, and pwd prints the working directory.


Now, to remove the directory ‘test’, execute following :

root@kali:~/Desktop/test# cd Desktop

Means we are changing to Desktop (getting out from ‘test)

root@kali:~/Desktop# rmdir test

Means we are deleting ‘test’ directory


Well, that’s the basics of working with directories in Kali Linux. As we move along, we’ll  encounter many other useful commands to work with directory.

(Note : If, you’re confused on how to execute these commands, please watch my video tutorial demo/lab here: https://youtu.be/svXodC_eJls )


(Feedback is sweet, so please provide it via comment 🙂

Enroll today for a free 7 Day Trial on these Career Paths:

Share with Friends
Use Cybytes and
Tip the Author!
Share with Friends
Ready to share your knowledge and expertise?
  1. Bijay –

    Very well thought out and written. This is great! My only comment is the videos: slow down your speaking.

    People are here and WANT to hear what you have to say. Take your time. It will VASTLY improve how people respond to you.


  2. “If, you’re confused on how to execute these commands, please watch my video”. what did you think about other people dude ?

Page 6 of 6« First...«23456
Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge


We recommend always using caution when following any link

Are you sure you want to continue?