DEV Community

Sugumar R
Sugumar R

Posted on

Day 2: Linux Basic Commands

Hello, everyone! πŸ‘‹

Today, I started learning Linux commands, and I want to share some basic yet essential commands that every beginner should know.

πŸ“Œ 1. Checking Your Current Directory

To know which directory (folder) you are in, use:

pwd

πŸ“Œ It prints the full path of your current working directory.

πŸ“Œ 2. Listing Files and Folders

To see all files and folders in the current directory, use:

ls

πŸ“Œ To view hidden files, use:

ls -a

πŸ“Œ 3. Navigating Between Directories

To move into a folder, use:

cd folder_name

πŸ“Œ To go back to the previous directory:

cd ..

πŸ“Œ 4. Creating a New Folder

To create a directory (folder), use:

mkdir my_folder

πŸ“Œ 5. Creating a New File

To create an empty file, use:

  1. mkdir command in Linux

This mkdir command allows you to create fresh directories in the terminal itself. The default syntax is mkdir and the new directory will be created.

For example, if you want to create a directory as β€œGeeksforGeeks” then the basic syntax would be:

mkdir GeeksforGeeks

There are the basic Linux commands learned today! Looking forward to learning more in the coming days.


Top comments (0)