Linux Basics

By: Aryan Jain

Mar 25, 2026Last updated: Mar 25, 2026
bash

echo "HEY GUYS WELCOME TO MY FIRST LINUX BLOG"            
            

Linux is something I've always been around but never fully learned. If you're anything like me you probably love coding and want to start going down to the more hardware level and thought that Linux would be a cool introduction. Without further ado, let's get started!

History:

In 1969 Ken Thompson and Dennis Ritchie made something called the UNIXUNiplexed Information and Computing System operating system. Later Richard Stallman made GNUa recursive acronym for GNU's Not UNIX which was based on UNIX but completely open source. It wanted to have a kernel but was unable to complete it in time. Which now begs the question: what is the kernel?

What is the Kernel?

The kernel can control:

The kernel was made by Linus Torvalds which was called the Linux kernal. When GNU and the Linux kernel were combined that created what most people call Linux now (note that Linux does actually only refer to the kernel). Anything that uses a Linux kernel is a Linux distribution or "distro".

Different Distros

The Shell

The shell is how we can type commands and have them executed on the operating system. Think of a command as no different than one you would give to your sibling or friend. If you ask your sister to give you a glass of water that is no different from us asking the operating system to ping an ip address. By using a GUIgraphical user interface we can open a shell session via applications like "Terminal" or "Console".

We are going to really dive into the BashBourne Again Shell application (note there are others such as the Zsh shell that Mac uses). Typically the line will start with a $ which indicates that the shell is ready to accept commands.

echo

this command just prints out whatever you input after

bash
echo "Hello World!"
output
Hello World!

pwdprint working directory

this command just prints out the current working directory

bash
pwd
output
/Users/aryanjain/Projects/kuiper-dashboard/infra
This is an example from my terminal, but this will just print wherever you are.

cdchange directory

this command is used to change the directory you are in

Hey so honestly there are a lot of different commands I am learning these from here so I would look over that for all of them. I am now going to just go over a couple that I didn't know previously.

In Linux we can have a file called "banana.png" and it doesn't have to actually be a png so we can use the file command to see what file type banana.png is!

The difference between less and cat: cat you can look at a file and it will display the whole file. Less you can look at chunks. cat puts the whole file into the buffer and will scroll you to the very bottom of the file that is printed out in the terminal so if it is a super long file I would recommend less. less also allows you to search by using / (whatever you want to search for) and you can go to the next occurrences by pressing n and the previous ones by pressing N.

bash
cp text.txt ./data/text
mv other_text.txt ./data/text/more

the manmanual command is used to learn more about a command. whatis is a short one-line version of man.

bash
man ls
man cd
whatis cat

stdout when you print stuff the stdout is where that information goes. To redirect that flow you can use either > or >>.

bash
echo "Hello World" > cat.txt
echo "using the >> appends to the file instead of deleting it" >> cat.txt

stdin - by default Bash gets its input from your keyboard, but we can make it so it takes input from a file source.

bash
cat < cat.txt
The cat command takes in stdin, so now we are redirecting it to look in cat.txt for what to input into the command.

pipe - the pipe command (|) is used to take the stdout of one command as the stdin to another. This command is used to link together commands such that we can develop stronger more powerful outcomes.

bash
ls -la /etc | less
The first command is fed into the less command. BOOM.

grepGlobal Regular Expression (if you take upper level CS classes at a university or if you know about regular expressions this term makes a lot of sense)

this is used to match a pattern in a file or find text in files.

bash
grep fox sample.txt

FINAL REMARKS

I used this blog mainly as a notes tab for myself so while I hope it was useful I do recognize that this isn't the best way to learn Linux. I think that you should look at this resource which is where I learned. Also as you develop as a CS student and developer you learn most of this stuff along the way. I would say the main thing you should learn is a general idea of what these commands do and then know what is the best command you need to research more to achieve what you need.