Introduction to Linux and its basic commands

Introduction to Linux and its basic commands

What is Linux?

Linux is an open-source operating system which means that its source code is freely available for anyone to view, use, and modify and it is based on the Unix operating system. Linux is known for its security and flexibility.

Linux Features

  1. Simplified updates for all installed software

  2. Free software licensing

  3. Access to source code

  4. Multiple Linux distribution

  5. Better malware protection

Basic Linux Commands

  1. To check your present working directory.

    pwd - Print working directory

  2. List all the files or directories including hidden files.

    ls - It is used to list all the items present in a directory.

    ls -l - It is used to list the files and directories with extra information.

    ls -a - It shows all files including hidden files.

    ls *.txt - It is used to list all text files.

  3. To change the directory

    cd - This command is used to change the directories

    cd <path> - To change the directory to the provided path

    cd .. - To change the directory to one step back.

    cd ~ or cd - Used to bring the user to the home directory.

  4. Commands to create the directory

    mkdir <directory_name>- This command is used to create the directory

    mkdir A B C D - It will create multiple directories.

    mkdir -p A/B/C/D - To create a nested directory.

    mkdir .<directory_name> - To create the hidden directory.

    mkdir Student{1..5} - It will create 5 directories.

  5. To create empty files

    touch <file_name>- This command is used to create an empty file

    touch filename{1..3}.txt - It is used to create three empty text files

So in this blog, I have explained some basic Linux commands now looking forward to throw some light on more commands in my next blog.

Suggestions are always welcome. Thank you !!