# Linux Fundamentals

If you're looking to get started in Linux then you have come to the right place.  
Here we are going to cover the fundamentals of Linux along with the basic command structure.

# What is Linux

From smartphones to cars, supercomputers to home appliances, the Linux operating system is everywhere.

Just like Windows, IOS and Mac OS, Linux is an operating System. In fact, the most popular platform on Planet, Android, is powered by the Linux operating system.

## Linux Distributions

Linux has several different versions to suit any type of user. There are over 600 distributions of Linux but there are three main “families” of Linux distributions. Most other Linux distributions use one of these three distributions as their foundation.

* **Debian**  
    Debian, which dates back to 1993, is one of the oldest Linux distributions still being developed today. Presently, the most popular Debian-based system is **Ubuntu.**
    
* **Red Hat**  
    Red Hat Enterprise Linux (RHEL) is the flagship operating system and is used on servers everywhere. CentOS is the free version of Red Hat Enterprise Linux.
    
* **SUSE**  
    SUSE Linux, while not as popular as Debian-based Ubuntu or any of the Red Hat distributions, is still considered to be one of the mainstream Linux distributions.  
    here are two distributions that fall under the SUSE family - SUSE Enterprise Linux and the more popular OpenSUSE. OpenSUSE is the freely offered edition and still features the latest updates.
    

### Basic Linux Commands

1. mkdir --&gt; To make a directory
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679928448541/761504e8-042b-482e-a0a1-bcd72b2c6274.png align="center")
    
2. cd --&gt; To change the directory
    
3. pwd --&gt; Present Working Directory
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679928861576/0b6445f0-af74-4734-997e-0e3f36316d73.png align="center")
    
4. touch --&gt; To create a new file
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679983790429/b455a2d4-ce99-415a-b9e0-27d88bd65e97.png align="center")
    
5. cp --&gt; To copy a file
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679983899299/49264256-290a-48f9-8caf-0570e505cd16.png align="center")
    
6. mv --&gt; To move a file and you can rename it as well
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679984012513/3793a5c5-7290-45d8-b859-df20cac8f9be.png align="center")
    
7. ls command--&gt; ls command is used to list the content inside a directory.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679984089005/e78822b1-19fe-4c1e-8598-ba3112ab2386.png align="center")
    
    Different parameters can be used alongside the ls command  
    **ls -l** --&gt; it will list the content in a long list format
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679984368400/3b2bf127-4438-4359-b390-cdc0801483ee.png align="center")
    
    ls -lt --&gt; it will sort the list by displaying recently modified files at top
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679984521244/692f8a0f-a22e-4a91-a1a3-72466c229ff5.png align="center")
    
    ls -ltrh --&gt; it will sort the list in reverse order in human-readable format
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679984685128/821a4594-e5a8-4765-b173-444827741e3f.png align="center")
    

| ls option | Description |
| --- | --- |
| ls -a | this command will list all the files including hidden files starting with. (dot) symbol. |
| ls -l | to list the content in a long list format |
| ls -lt | to list the files by displaying recently modified files at the top |
| ls -lr | to list the files in reverse order |
| ls -lh | to list the files in a human-readable format. |
| ls --version | to check the version of ls command |
| ls -n | to list the group if and owner id instead of their names |
| ls -ld | to list any subdirectories |
| ls -R | to list the content of the subdirectory as well |
| ls -li | to list the files along with index number |
