Introduction to Linux
What is Linux
Linux is a free and open-source operating system that's like Windows or macOS but with a penguin mascot! It was created by Linus Torvalds in 1991 and has become super popular! It's powerful, customizable, and loved by tech enthusiasts. So, if you're curious about exploring a new world of computing freedom, Linux is the way to go!
Linux has Multiple Versions-:
UBUNTU
FEDORA
KALI LINUX (Mostly used for Hacking)
REDHAT
CENTOS
SUSE
Basic Linux commands
Navigating files system
ls: List files and directories in the current location
ls [options] [directory]
cd: Change the directory to navigate through different folders.
cd [directory]
pwd: it shows working directory
pwd
Working with Files and Directories
mkdir: Create a new directory
mkdir [directory]
touch: Create a new empty file
touch [filename]
cp: Copy files and directories
cp [options] [source] [destination]
mv: Move or rename files and directories.
mc [options] [source] [destination]
rm: Remove files and directories
rm [options] [file/directory]
File and Text manipulation
cat: Display the content of file.
cat: Display the content of the file.
cat [filename]
head: Display the first lines of a file.
Syntax: head [OPTIONS][FILE]
Example
head -n 10 myfile.txt
In the example above, -n 10 tells that you want to display the first 10 lines of the file.
tail: Display the last few lines of a file.
tail [options] [file]
Example
tail -n 10 file.txt
The example above displays the last 10 lines of the files ''file.txt'
System Administration
sudo: Executes a command with administrative privileges
sudo [command]
apt-get
(for Debian-based distros) ordnf
(for Fedora-based distros): Package management commands for installing, updating, and removing software.sudo apt update
: Used to update the package index files to get the latest list of available packages in the repositories.
sudo apt update
User and Permission Management
Whoami: Print the current username
whoami
passwd: change password of the current user.
passwd
useradd: Add new user
useradd [options] username
Why Linux is perfect for DevOps?
One of the key benefits of it is open source..!
It means that anyone can contribute to its development. Linux and DevOps both have the same goals which is Scalability. Scalability lets you deliver the software faster.
Some key features which are the cherry on top are it a Free, customizable, Light and very much popular.
Linux gives flexibility to the DevOps team with the flexibility needed to develop a fluid development process. You can configure it as per your requirements instead of letting the operating system decide what you do.
Subscribe to my newsletter
Read articles from Akshay Fasale directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by