Introduction to Linux

Introduction to Linux

Day 2 of 90 days of Devops

·

2 min read

What is Linux?

Linux is an open-source operating system based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds.

Linux was originally developed for personal computers based on the Intel x86 architecture but has since been ported to more platforms than any other operating system. Because of the dominance of Linux-based Android on smartphones, Linux, including Android, has the largest installed base of all general-purpose operating systems, as of May 2022.

Linux Distribution

A Linux distribution may also be described as a particular assortment of applications and utility software (various GNU tools and libraries, for example), packaged with the Linux kernel in such a way that its capabilities meet many users' needs. The software is usually adapted to the distribution and then combined into software packages by the distribution's maintainers. The software packages are available online in repositories, which are storage locations usually distributed around the world

Some of the popular distributions are -

  • Debian based like Ubuntu, LinuxMint, LinuxLite

  • Arch based Manjaro, BlackArch

  • Fedora

  • RedHatEnterprise

  • SUSE

Linux commands

change directory(cd) - used to change the directory

syntax - cd directory_name

List (ls) - used to get the lists of files & directories available at the location

syntax - ls

some variations in the ls command -

ls -a

used to display hidden files

ls -lha

used to display files and directories permissions in a human-readable format.

Print working directory (pwd) - used to get the directory in which the user is present

create files (touch) - used to create an empty file

syntax - touch filename

To create multiple files -

syntax touch file_{1..10}.txt

here 1-10 is the range, the above command will create 10 files

Read file (cat) - used to read data inside the files

syntax - cat filename

Print to console (echo) - used to print something on the terminal

syntax - echo "your message"

Make a directory (mkdir) - used to create an empty directory

syntax - mkdir dir_name

To make a nested directory -

Note -: here, -v is for verbose (acknowledgment) and -p is to create a nested directory.