Kali Linux Command Lines Part 1 – Getting Started with Directories

http://www.studentvideotutorial.com/2017/04/kali-linux-command-lines-part-1-getting.html

Welcome, everyone, to this new series on using command lines in Kali Linux. My name is Bijay and I’ll be teaching you the whole series of this training. This training series is recommended for beginners.

Getting Started with Directories
This module is a brief overview of the most common commands to work with directories: Like pwd, cd, ls, mkdir and rmdir. We will see all commands in Kali Linux terminal.
pwd – print working directory
cd – change directory
ls – list contents
mkdir – make directory
rmdir – remove directory

Recognizing some directories of 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)

Now, let’s talk about how to execute above mentioned 5 commands.

root@kali:~#
means we are in home folder.

Write ‘cd /’
root@kali:~# cd /
means we now changed directory from ~ to /

Write ‘ls’
root@kali:/# ls
means it will list/show the content of / directory

image source : kali linux terminal (screenshot)
Now, lets 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 in desktop now. To change directory to ‘test’, use ‘cd test’, and to list the content ‘ls’. i.e.
root@kali:~/Desktop# cd test
root@kali:~/Desktop/test# ls

To know working directory, we write ‘pwd’. So,
root@kali:~/Desktop/test# pwd
It will o/p ‘test’ in next line, because we are in ‘test’ folder, and pwd prints 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, this is the basics of working with directories in kali linux. As we move along, we will encounter many other useful commands to work with directory.
(Note : If, you are in confusion to execute this commands, then please watch my video tutorial demo/lab on this part given here : video

Hi! It’s nice to see you’re sharing information, however would you mind formatting code using the in-built function? There is also markdown support so that you can properly format your headings and subheadings.

See:

ok. thanks alot for tips. thanks. :slight_smile:

This topic was automatically closed after 30 days. New replies are no longer allowed.