---
title: "5 Linux Directory Commands Useful for Beginners"
description: "Directories are pretty much needed in Linux to store files and create sub-directories. Here you will know how to work with these directories."
url: https://srinimf.com/2022/01/09/5-linux-directory-commands-useful-for-beginners/
date: 2022-01-09
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2022/01/pexels-photo-6267023.jpeg?fit=1880%2C1253&ssl=1
categories: ["Linux"]
tags: ["Linux directory commands"]
type: post
lang: en
---

# 5 Linux Directory Commands Useful for Beginners

Here are useful beginner Linux **directory commands**. Why do I use the term beginner? [These are](https://srinimf.com/2017/10/24/linux-su-these-are-popular-real-life-examples/) such must-know commands. And, even an experienced Linux engineer if know these commands can do his job well.

Related[Differences Between Find and Locate in Linux](https://srinimf.com/2020/08/22/linux-find-vs-locate-quick-differences/)

## Linux Directory Commands

1. How to make a directory
2. How to list directories
3. How to delete directory
4. How to use rm command
5. How to use rm-rf command

Related[5 Essential Commands for Navigating Files in UNIX](https://srinimf.com/2014/08/07/unix-daily-5-commands/)

### [How to](https://srinimf.com/2020/03/24/linux-how-to-create-your-own-command/) make a directory

```
$ mkdir ramu
This is the basic commnd to create a directory
```

### How to list directories

```
$ ls -ld ramu
It displays details of ramu directory.
The first letter d denotes directory.
```

![ls -ld command](https://i0.wp.com/srinimf.com/wp-content/uploads/2022/01/listing-directory.png?resize=497%2C81&ssl=1)

```
$ tree
This command shows all the Parent and child directories.
The directory ramu has venkat directory.
```

![tree command](https://i0.wp.com/srinimf.com/wp-content/uploads/2022/01/tree-command.png?resize=382%2C174&ssl=1)

### How to delete a directory

```
$ rmdir ramu
When the directory is not empty, the rmdir will not work.
```

There is a command you can delete parent and sub-directory interactively using the *rm -ir *c*ommand.*

```
$ rm -ir ramu
```

![rm -ir command](https://i0.wp.com/srinimf.com/wp-content/uploads/2022/01/remove-directory.png?resize=576%2C162&ssl=1)

### How to use rm -rf command

Using this you can remove all the directories and files without interaction. This is a dangerous command and you must avoid always it. It removes all the files permanently, so you may miss some crucial data.

```
$ rm -rf ramu
```

Related posts

- [5 Essential Commands for Navigating Files in UNIX](https://srinimf.com/2014/08/07/unix-daily-5-commands/)DateAugust 7, 2014
- [How to Make Directory Sharable in Linux](https://srinimf.com/2022/12/31/easy-ways-to-share-a-file-in-linux/)DateDecember 31, 2022
- [9 Features of Linux Operating System](https://srinimf.com/2019/03/02/9-linux-tricky-points-every-user-must-know/)DateMarch 2, 2019

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2022%2F01%2F09%2F5-linux-directory-commands-useful-for-beginners%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2022%2F01%2Fpexels-photo-6267023.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=5%20Linux%20Directory%20Commands%20Useful%20for%20Beginners)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2022/01/09/5-linux-directory-commands-useful-for-beginners/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2022/01/09/5-linux-directory-commands-useful-for-beginners/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2022/01/09/5-linux-directory-commands-useful-for-beginners/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2022/01/09/5-linux-directory-commands-useful-for-beginners/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%205%20Linux%20Directory%20Commands%20Useful%20for%20Beginners&body=https%3A%2F%2Fsrinimf.com%2F2022%2F01%2F09%2F5-linux-directory-commands-useful-for-beginners%2F&share=email)
-

### Like this:

Like Loading…
