Starting out with Linux(Part 1)

Starting out with Linux(Part 1)

Table of contents

No heading

No headings in the article.

The first and the foremost thing before starting out with linux is "What exactly is Linux?"
So the answer to that question is Linux is an open-source Unix-like operating system based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds.

Screenshot from 2022-10-13 22-29-54.png


Using Linux

Since linux and macOs both are UNIX based operating systems , so the commands for them is usually same. But if you are a windows user then there are generally 3 ways by which you can use linux.
  • Windows Subsystem for Linux(WSL) : Windows Subsystem for Linux is a compatibility layer for running Linux binary executables natively on Windows 10, Windows 11, Windows Server 2019 and Windows Server 2022. In May 2019, WSL 2 was announced, introducing important changes such as a real Linux kernel, through a subset of Hyper-V features. For its installation process you can click here.
  • VMware and Virtual Machines: Using a VMware or a virtual machine or a virtual box.A Virtual Machine (VM) is a compute resource that uses software instead of a physical computer to run programs and deploy apps. One or more virtual “guest” machines run on a physical “host” machine. Each virtual machine runs its own operating system and functions separately from the other VMs, even when they are all running on the same host. This means that, for example, a virtual MacOS virtual machine can run on a physical PC. If you want to setup a virtual machine on your windows operating system , you can check out this.
  • Booting Linux into a USB: There are several distribution in linux , but generally for beginners Ubuntu is preferred but you can chose either of anyone.So this dual booting of your system is quite complicated procedure but you can do this.Even I have dual booted my system, one part is having windows 11 and the other one is having ubuntu. So the installation procedure is here. So now as you have set up linux based on your operating system, lets learn linux.

    What happens when we start our system?

    It executes the software in BIOS(Basic Input Output System). The CPU starts and fetches instructio#ns into RAM from the BIOS, which is stored in the ROM. The BIOS starts the monitor and keyboard, and does some basic checks to make sure the computer is working properly. For example, it will look for the RAM. The BIOS then starts the boot sequence.

    Operating System

    An operating system (OS) is the program that, after being initially loaded into the computer by a boot program, manages all of the other application programs in a computer. The application programs make use of the operating system by making requests for services through a defined application program interface (API).
    There are 4 things a software should consider before calling it an operating system :
  • Kernel.
  • FileSystem.
  • User Interface[CLI,GUI].
  • Should be able to manipulate data based on commands.
  • Some of the major operating system are:
  • Microsoft Windows
  • MacOs
  • Android
  • Linux

  • But Why Linux???

    Below are some reasons why linux is considered over windows operating system :
  • Linux is open source.
  • Linux generally supports all the programming languages.
  • Terminal is superior to command prompt.
  • Bash scripting.
  • SSH into a system and many more.

  • Tree hierarchy of files

    Screenshot from 2022-10-13 23-47-43.png / : is the root directory.
    . : current directory.
    . . : parent directory.
    The best thing about linux is that we can manipulate with the files by not even being at the respective directory.


    Commands to get started

    Lets create an empty file named hello.txt and check the status of the file. Screenshot from 2022-10-14 00-07-40.png touch hello.txt command is used to create an empty text file.
    file hello.txt command used to determine the type of file (here empty).
    gedit hello.txt : text editor in ubuntu, type (Do like my blog:))
    cat hello.txt : to view the content inside the file we have created. Screenshot from 2022-10-14 22-59-48.png Auto complete a command using Tab and also on double clicking Tab it autocomplete the directories with same starting name.
    $ cp : copy command helps us to copy the file and even keeps the original file at the initial position.
    $ mv : will shift the file to the desired location but it will also remove it from the original position.
    $ rm : to remove a file.
    $ rmdir : to remove a directory.
    $ mkdir -p File/Folder : this command will create "File" directory and then add "Folder" directory it.(-p flag makes directory inside directory) Screenshot from 2022-10-14 23-15-28.png $ rm -r : to delete directories recursively. Screenshot from 2022-10-14 23-18-33.png $ find ~ -name a.txt : will find a.txt in the home directory.
    $ find ~ -name a.* : will find the files named 'a'.
    $ find ~ -name *.txt : will find all the txt files.
    $ find ~ -type d -name a : find the directory with name "a"


    Thanks everyone to read this blog. In the next one we will study about the "Standard streams and File manipulations".Till then have a good day.
    Do follow me on Twitter