Here are some basics in Linux commands that you should know to start your journey with Linux without any trouble in 2021

To check whether your Linux distribution is 32bit or 64 bit
uname -m
To check whether the desired software is available on ubuntu
For git, use the below command
git --version
For Ubuntu, pthon3 will be the default so, use the below command
Python3 --version
Find the executable location of the software
For git executable location, use the below command
which git
For Python3 executable location, use the below command
which python3
Files and folders
Creates a file and allow you to edit it
cat>filename.txt
Save and exit the opened file by short key Ctrl+D
Open the created file
cat filename.txt
Creates an empty file but you cannot edit it
touch filename.txt
Removes the created file
rm filename.txt
creates a folder
mkdir folder
removes the empty folder directory
rmdir folder
removes a folder directory
rm -rf folder
long listing the existing folders
ls -l
Install and uninstall any application
Use the below command to install any software application
Sudo apt-get install application_name
Use the below command to uninstall any software application
Sudo apt-get remove application_name
Copy and paste in the terminal
Use the short key to copy
Shift+ctrl c
Use the short key to paste
Shift+ctrl v
Still confused! Don’t know what to do, how to start then let me guide you, check the video link provided below
The video resource provided below, I found, so far the best resource for beginner to start a journey in Linux commands
However, the video doesn’t cover all the Linux commands that are existed there but covered the basic commands that are necessary for a beginner to take his first step in Linux commands.
Still confused! You don’t know, what is a Linux? What is ubuntu and why we need Linux? But wait! do you know which linux distribution should you use? And what is a virtual box and how to download it?
Click here to know all the above information
I suggest you, to go through the link above mentioned to download Linux on your desktop and also fact that the Linux commands that are mentioned above are enough for beginner to feel good about Linux
Remember you won’t learn Linux in one day, you need to play with it and form your own questions and find answer’s for questions, that’s how you learn Linux
Another thing I like to suggest you not learn all command’s at first then start using it, it is better you learn some basic commands and play with it and form your questions and find answers, that’s how you learn quicker than from others
How to zip and unzip folders in Linux
The folder can be zipped by right click on that folder and select the compress option and to unzip the zipped file right-click on that folder and select extract here option
Why we use zip files
Because zip files compress data and save time and space and make downloading files and transferring e-mail attachments faster
How to use ssh in Linux
There are many ways by which you can connect a Linux machine to a remote machine for example you can use
- MobaXterm
- Putty
In case, if you have a window machine and you are using your Linux machine through a virtual box then you need to follow the below steps to connect ssh
Step 1#: set network setting in virtual box
First, open the virtual box
Second, click setting and select the network option
Third: set the first adapter setting to NAT
Fourth: enable the second adaptor and set the setting to a bridged adapter
Fifth: press ok
Step 2#: install ssh on your Linux machine
First, connect to your localhost to check whether ssh is installed or not
ssh localhost
And in case, if you see an error something like this: connect to host localhost port 22: connection refused then that means ssh is not installed in your machine
So, install ssh by below command
sudo apt-get install openssh-server
To check, whether you successfully installed the ssh
sudo service ssh status
Press Q to quit the mode
Step 3#: note down your IP address
First , install the net-tools to view the IP address of your machine
sudo apt-get install net-tools
To check the IP address use the below command
ifconfig
Your IP address will be inlet value which will be something similar to 192.168.102.6
Neglect the default ip addresses such as 127.0.0.1 and 10.0.2.15
Step 4#: login to a remote machine
To connect the window machine with the remote machine Linux, a tool called mobaXterm is used
First, open the mobaXterm
Second: type the command
ssh userid@ip_address
For user_name use the remote machine user name(Linux user name ) and for, ip_address use the remote machine IP address(Linux machine IP address)
When MobaXterm ask for a password then enter the password of your remote machine (Linux machine)
Some basic problems or errors you find in linux
First error: BUSYBOX v1.30.1(ubuntu 1:1:30.1-4ubuntu6.0.) built in shell (ash)
The BUSYBOX initrams error, usually you see this kind of error when you opening your ubuntu or whichever distribution you have
Type the below command
(initramfs) exit
You will get something like this
/dev/sda5: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY
Fsck exited with status code 4
The root filesystem on /dev/sda5 requires a manual fsck
This means that your partition sda5 has a problem so, to remove it use the below command
(initramfs) fsck /dev/sda5 -y
In this case, sda5 have a problem in your case it might be sda0,sda1,dsa2, etc
Finally, reboot the system
(initramfs) reboot
1 Comment