# Exploring Linux Fundamentals (June 11)

# Linux architecture

![Linux-Architecture](https://media.geeksforgeeks.org/wp-content/uploads/20200105215737/Untitled-Diagram-215-1.jpg align="left")

1. **Kernel:** Kernel is the core of the Linux-based operating system. It virtualizes the common hardware resources of the computer to provide each process with its virtual resources. This makes the process seem as if it is the sole process running on the machine. The kernel is also responsible for preventing and mitigating conflicts between different processes. Different types of the kernel are:
    
    * Monolithic Kernel
        
    * Hybrid kernels
        
    * Exo kernels
        
    * Micro kernels
        
2. **System Library: Is**the special types of functions that are used to implement the functionality of the operating system.
    
3. **Shell:** It is an interface to the kernel which hides the complexity of the kernel’s functions from the users. It takes commands from the user and executes the kernel’s functions.
    
4. **Hardware Layer:** This layer consists all peripheral devices like RAM/ HDD/ CPU etc.
    
5. **System Utility:** It provides the functionalities of an operating system to the user.
    

# Linux File Hierarchy Structure

![linux-directory](https://media.geeksforgeeks.org/wp-content/uploads/20230516105759/151.webp align="left")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1686384978333/ca06b0f0-6d83-45d0-9224-ec62226f2206.png align="center")

### **Linux Commands**

hat every Linux user(**as a** **beginner**) should know. These are not all that you should know, but these are the basic and most commonly used commands.

1. **Is –** Displays information about files in the current directory.
    
2. **pwd –** Displays the current working directory.
    
3. **mkdir –** Creates a directory.
    
4. **cd –** To navigate between different folders.
    
5. **rmdir –** Removes empty directories from the directory lists.
    
6. **cp –** Moves files from one directory to another.
    
7. **mv –** Rename and Replace the files
    
8. **rm –** Delete files
    
9. **uname –** Command to get basic information about the OS
    
10. **locate–** Find a file in the database.
    
11. **touch –** Create empty files
    
12. **ln –** Create shortcuts to other files
    
13. **cat –** Display file contents on terminal
    
14. **clear –** Clear terminal
    
15. **ps-** Display the processes in terminal
    
16. **man –** Access manual for all Linux commands
    
17. **grep-** Search for a specific string in an output
    
18. **echo-** Display active processes on the terminal
    
19. **wget –** download files from the internet
    
20. **whoami-** Create or update passwords for existing users
    
21. **sort-** sort the file content
    
22. **cal-** View Calendar in terminal
    
23. **whereis –** View the exact location of any command types after this command
    
24. **df –** Check the details of the file system
    
25. **wc –** Check the lines, word count, and characters in a file using different options
    

# **Linux hands-on**

* ### basic commands for creating files and displaying it
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1686393276063/5df5896e-0960-4a55-911d-88b1f6ceea91.png align="center")

* ### Remaining my picture and then copy to the folder and moved the whole folder back
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1686393906362/d1019dc0-884c-4502-91cc-2f8ca05d5c89.png align="center")

you can mv a folder without using -r (when using the mv command to move a folder, it automatically performs a recursive move by default) but for copying a folder you have to use -r.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1686395303202/42b1a005-f466-4fed-a929-b47e31d1d776.png align="center")

* ### for creating multiple files and folder and removing it
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1686394377397/c50ea410-3edb-4dd5-a8d5-fb68140536e2.png align="center")

The same goes for the folder but when you remove a folder you have to "-r " which means recursive to remove files inside the folder

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1686394664416/3920a096-03a5-48b7-8be5-b25d3f5cc174.png align="center")
