Linux basics
Published: 2023-02-02 05:43:46

## Linux :
A family of open-source Unix-like operating systems based on the Linux kernel. A text-based user interface for your computer is the Linux command line. It can appear to be complicated and difficult to use because it is frequently referred to as the shell, terminal, console, prompt, or by several other names.

#### Terminal:
Commands are written here for specific tasks.
Two ways to open terminal emulator:
1) Go to search box type "terminal" then it shows click on it.
2) Short-cut ctrl + alt + t

#### Basics Commands to know
|Command line | Description |
|:------------------:|--------------------------------------:|
|ls|Lists all files and directories in the present working directory|
|ls – R 	|Lists files in sub-directories as well|
|ls – a 	|Lists hidden files as well|
|ls – al 	|Lists files and directories with detailed information like permissions, size, owner, etc.|
|cat > filename 	|Creates a new file|
|cat filename 	|Displays the file content|
|cat file1 file2 > file3 	|Joins two files (file1, file2) and stores the output in a new file (file3)|
|mv file “new file path” 	|Moves the files to the new location|
|mv filename new_file_name 	|Renames the file to a new filename|
|sudo 	|Allows regular users to run programs with the security privileges of the superuser or root|
|rm filename 	|Deletes a file|
|man 	|Gives help information on a command|
|history 	|Gives a list of all past basic Linux commands list typed in the current terminal session|
|clear 	|Clears the terminal|
|mkdir directoryname 	|Creates a new directory in the present working directory or a at the specified path|
|rmdir 	|Deletes a directory|
|mv 	|Renames a directory|
|apt-get 	|Command used to install and update packages|

### File System
A Linux file system is a built-in layer of a Linux operating system that is used to manage storage data. It aids in the organisation of files on disc storage. It manages a file's name, size, creation date, and much more information.

The Linux file system contains the following sections:

- The root directory (/)
- A specific data storage format (EXT3, EXT4, BTRFS, XFS and so on)
- A partition or logical volume having a particular file system.


### Kernal
- The Linux kernel is a free, open-source, multitasking, modular, monolithic, and Unix-like operating system kernel. Linus Torvalds created it in 1991 for his i386-based PC and it was quickly adopted as the kernel for the GNU operating system, which was written to be a libre (free) replacement for Unix.

- Linux is distributed under the GNU General Public License v2, but it includes files licensed under other compatible licenses. Since late 1990, it has been included in a number of operating system distributions, many of which are also commonly referred to as Linux.
- The GCC GNU extensions to the C programming language are used to write almost all of the Linux kernel code.
- It generates a highly optimized vmlinux (executable) to maximize task execution time and memory space.
- Daily development discussions focus on the LKML (Linux Kernel mailing list).
- Changes are tracked using the git version control system, which Torvalds created for BitKeeper as a free software replacement.


### Folder Structure

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzx2we7k0pvg28hk900v.png)