# Introduction to Linux

## What is Linux?

Linux is an open-source operating system based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds.

Linux was originally developed for personal computers based on the Intel x86 architecture but has since been [ported](https://en.wikipedia.org/wiki/Porting) to more platforms than any other operating system. Because of the dominance of Linux-based Android on smartphones, Linux, including Android, has the largest installed base of all general-purpose operating systems, as of May 2022.

## Linux Distribution

A Linux distribution may also be described as a particular assortment of applications and utility software (various GNU tools and libraries, for example), packaged with the Linux kernel in such a way that its capabilities meet many users' needs. The software is usually adapted to the distribution and then combined into software packages by the distribution's maintainers. The software packages are available online in repositories, which are storage locations usually distributed around the world

Some of the popular distributions are -

* Debian based like Ubuntu, LinuxMint, LinuxLite
    
* Arch based Manjaro, BlackArch
    
* Fedora
    
* RedHatEnterprise
    
* SUSE
    

## Linux commands

*change directory(cd) -* used to change the directory

`syntax - cd directory_name`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679398775999/17f224b5-f0ab-485f-924f-c0f6568de078.png align="center")

*List (ls)* - used to get the lists of files & directories available at the location

`syntax - ls`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679398890675/3d26ea99-bed1-4959-bf0a-8161bc50a892.png align="center")

*some variations in the* ***ls*** *command* \-

`ls -a`

*used to display hidden files*

`ls -lha`

*used to display files and directories permissions in a human-readable format.*

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679399079443/d62c3735-1ce3-4978-9645-f3eed6bd5a71.png align="center")

*Print working directory (pwd) -* used to get the directory in which the user is present

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679399219941/834886ba-7719-4463-afa3-869c388872ae.png align="center")

*create files (touch) -* used to create an empty file

`syntax - touch filename`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679399322122/291e37f0-db8f-48d1-8f40-f519bb1d22ef.png align="center")

*To create multiple files -*

`syntax touch file_{1..10}.txt`

here 1-10 is the range, the above command will create 10 files

*Read file (cat) -* used to read data inside the files

`syntax - cat filename`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679399521312/8bbb8177-8681-47f2-93dd-27a90e33919b.png align="center")

*Print to console (echo) -* used to print something on the terminal

`syntax - echo "your message"`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679399626563/85d53f8d-1ae2-4a21-bfbd-1d3009436a11.png align="center")

*Make a directory (mkdir) -* used to create an empty directory

`syntax - mkdir dir_name`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679399818690/c4fc3afb-624b-461d-ad5c-4b117b84eb62.png align="center")

*To make a nested directory -*

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679399897487/d659a607-efea-455e-a63d-fdb32c16b367.png align="center")

*Note -: here, -v is for verbose (acknowledgment) and -p is to create a nested directory.*
