Why Linux and Get started with Linux.

·

2 min read

Why Linux? Linux is the most widely used Operating System in the world. If you haven't worked with Linux previously, initially it seems complicated but it is not, and learning Linux is as easy as any other Operating System.

Why do you actually need Linux?

  • Open-source.

  • To get rid of multiple clicks for simple operations.

  • To learn the cloud easily as most of the server's spinning on a Linux environment.

These are some of the overviews we have on Linux, but why do developers love to work on Linux machines over windows?

Let's do a task on both windows and Linux machines. Task: Create a folder inside and make another folder, inside that folder make a text file. Window's turn: Right-click -> new folder -> folder name, double click on created folder -> right-click again -> new folder -> folder name. Double on created folder and right-click to make a new text file with the extension of .txt.

So many clicks...

Linux turn: Give the following commands, mkdir foldername1 cd foldername1 mkdir foldername2 cd foldername2 touch filename.txt

5 steps same job is done.

So to simplify all the processes like creating a file, updating a package, and so on linux is preferred by many developers.

Here I have presented a group of commands commonly used in linux to get started with it.

Windows(Run as administrator) == sudo in linux(sudo is thanos in linux)

File Operations touch filename - To create a file. mkdir directory_name - To create a directory ie folder. cd dirctory_name - To get into the directory. cd .. - To get out of the current directory. cp file1 file2 - To copy the content of the file. rm filename - To remove the file. cat file1 file2 - To concatenate two files. pwd - To know your current directory
ls - To get the list of the files in the directory.

File Permissions - we can restrict the action on the files by other users using simple commands. The first digit is owner permis­sion, the second is group and the third is everyone. Calculate permission digits by adding the numbers below. 4 - read (r) 2 - write (w) 1 - execute (x)

Eg: chmod 777 filename - File will have all the permissions of read, write and execute.

ln file1.txt file2.txt - This creates a hard link file2.txt that refers to file1.txt.

There are thousands of operations we can do on files using Linux here I have listed very few of them to get started with it.

Thanks for reading.