Connect with us

linux

25 Basic Linux Commands For Beginners With Example

Published

on

Basic linux commands for beginners
Basic linux commands for beginners tutorial is designed for beginners.If you are a beginner and want to learn and understand the basic linux commands easily then this tutorial is for you.
 
The linux is a flavor of Unix.So its offer all the feature that Unix has.There are various linux variants known as linux distributions.Ubuntu,Fedora,Open Suse,Linux mint are some of the examples.To learn how to use linux,the linux commands are very important.

Learning the basic commands for beginners are very important.So you can easily get the benefits of the features of linux.

Here are some of the best features of linux.

 
  • The best feature of linux is that it is open source operating system.
  • Linux is powerful,flexible and very light weight program.
  • It is very fast and can be used in low specifications
  • Several people can use a linux computer at the same time,hence linux is called a multiuser system.
  • A user can also run multiple programs at the same time,hence linux is a multitasking environment.
  • Linux has lots of distributions.So you can choose what suits your job best.
Linux is a wide area topic.Lot of things to know and lots of thing to learn.The linux command is very important for learning the use of linux.Here 25 basic linux commands that will help you to learn linux if you are a beginner.

Basic Linux Commands For Beginners With Example:

 
(1) ls- The ls commands helps to listing files and directory
 
ls command in linux

 

(2) cd-This command used for change directory
cd command in linux
 
 
(3) mkdir- To create a directory this is used.In unix a path of folder or single folder treat as a directory.
mkdir command in linux’

(4) cat-To create a file cat command with a > symbol is used.

The cat command create a file and opens the editor mode.We can write anything on this fie.Press clt+d to exit from the editor.
 
Ex- cat >abc.txt

cat  > command in linux
 
cat abc.txt where abc.txt is the file name used to show the context of the file.Note that here we do not use > symbol.Use space between cat and file name.

cat command in linux

cat command in linux

cat linux command to show data of a file
 
cat >> mnp.txt – This comand used for apend a file.
We can add any data but can’t modify any data.
 

"cat

cat linux command for add data in a file
 
(5) touch- This command just create a text file.
touch command in linux

touch command in linux

touch command in linux
 
(6) vi- To edit a file we need vi editor.

vi command in linux

vi command in linux

vi command in linux

To open a file and edit it we use vi command.

Use space between vi and filename.
Press i to insert any data.
 
vi command to edit a file in linux



(7) rm filename-This command used for delete a file.Use rm following with a space and put the filename you want to delete.
 
 
rm command in linux

rm command in linux

rm command in linux

 

(8) rmdir directory_name- To delete a directory use rmdir following with a space and put the directory name.

 

rmdir command in linux

rmdir command in linux

rmdir command in linux to create a directory
 
 
(9) wc file_name- To count the number of line,word,character of a file this comand used.The information will be used by following format
Line        Word        Character

 

wc command in linux

wc command in linux

wc command in linux
This are the advance option to use the wc command.
 

wc -l file_name –  To show the text

wc -l command in linux

wc -l command in linux

wc -l command in linux

wc -c file_name-  To show the character
 
wc -c command in linux

wc -c command in linux

wc -w command in linux

wc -w file_name- To show the word 
 
wc -w command in linux

wc -w command in linux

wc -w command in linux

Note:
Use spcae between wc and -l,-c,-w
 
(10) cal- To show the date as a calendar
 
cal command in linux

cal command in linux

cal command in linux


This are the advance option to use the cal command
cal yearTo show the current year calendar

cal year command in linux

cal command example in linux


cal month year-To show the particular month in calendar format of a particular year.

cal month year command in linux

cal month year command in linux

cal command example in linux


(11) who-This command will show how many users are logged in

who command in linux


(12) who ami i
-This command will show the current user


who am i command in linux


(13) chmod-this command use to set permission of a file for a user.There are three types of permission that is Read,Write,Execute.This permission set using o,w,x.
The syntax of chmod is [reference] [operator] [mode] file_name

Where references means

u-owner
g-group
o-others
a-all

Where operator means

operator 
      +                            add this modes
      –                             remove this mode
      =                            modes specified are to be made
                                    the exact modes for the specified
                                    classes

Where mode means

r –  read permission
w- write permission
x-  execute permission

You can also use this technique for set permission
4->Read
2->Wrire
1->Execute

Example- chmod o-w+x sample.txt

chmod example in linux


(14) sh-To run a shell program or scripts sh command we use sh command.To run a shell scripts place the sh command before the shell script.

Example-sh prog.sh

sh command in linux





(15) sudo- the sudo command stands for superuser do.This command used when you need to do a job in root level.

Example-sudo passwd root

sudo command in linux

this command will create a root user


(16) manThe man command known as a manual command.This command will show the inputted command.

 

man command in linux

Example- man cd

man command example in linux


(17) locate-The locate command kown as a find command in linux.To find a command in linux OS you can use the locate command.

Example- locate file_name

locate command in linux


(18)cp- This command used for copying a file from one directory to another

Example- cp xyz.txt abc.txt
This command will copy the xyz.txt file content to abc.txt

cp command in linux


(19)clear-The command exactly use does what is means.The clear command clears the screen when there are so many commands and readouts.Just type the clear on the screen and you will get a clear screen.

Example- clear

clear command in linux


(20)exit – This command exit a shell scripts.

exit command in linux
 

(21)ifconfig- This command used for configuring a linux system interface.

ifconfig command in linux

(22) iw- This command used to manage wireless device and their configuration.

iw command in linux

 

(23) last-This command shows the last logged in user
 
 
last command in linux
 
(24) login- login command is used to create a new session with the system.You will be asked a add a user name and password.Note that some OS need root user to use this command.So you have to log in as a root before this command.

 

login command in linux


(25) su- The su command is used to switch to another user or become root user during a session.You will be asked to add user name and password to log in.
 
su command in linux

All of this 25 basic linux commands are very useful for beginners.This commands used almost everyday.You can learn more about linux by simply bookmark us and visit us.

Do you want more useful command or have some suggestion for this command list.Let us know know by commenting below.Please support us by liking our Facebook page.

Continue Reading
1 Comment

1 Comment

  1. Pingback: Basic Shell Script Examples - Tech It Easily

Leave a Reply

Your email address will not be published. Required fields are marked *

linux

Best Linux Distro For Gaming 2021

Published

on

By

Best linux distro for gaming

Linux Distro for gaming are now getting popular. Many gamers are playing games on linux. More developers are now working on open source projects. This helps linux gaming more easier now. Many tools now support the linux.

The gaming on linux distribution are now become easy for the Proton compatibility layer that helps translate Direct-X windows-only games to Vulcan on Linux.

There are so many linux distribution that mainly designed for gaming. With a very good support gaming on linux are now possible.

This gaming linux OS has lots of feature. If you are looking for best os for gaming. Then you can use this linux gaming distro.

In this article we have discussed some of the best linux distro for gaming. Check this list for best linux OS for gaming.

Best Linux Distro For Gaming –

Pop!_OS –

Pop!-OS is a linux distro that specially designed for creative professionals. You can use this Operating system design and create your project.

It is one of the best linux for gaming. The software libraries of Ubuntu and Flatpak work together to make all of your tools available in one place, called Pop!_Shop.

Pop OS

Their Pop!_Shop is similar to the Play Store for Android or the App Store for iOS. New applications are constantly added to the mix for a smooth productivity cocktail.

The selection and performance of games provided by Steam, Lutris, and GameHub is unparalleled. On a single-OS PC, you can roam free with your game library.

It has lots of faeture for gaming. That’s why gaming on linux become so easy.

Feature Of Pop!_OS –

  • Auto-Tiling With Pop Shell
  • Workspaces
  • Keyboard Navigation
  • Stacking
  • Encryption
  • Update on Your Terms
  • Firmware Management
  • Hybrid Graphics
  • Do Not Disturb
  • Dark mode

Manjaro Linux –

The Manjaro operating system is a friendly, accessible and open-source operating system.Taking full advantage of cutting-edge software, the company provides an easy-to-use interface, automated tools that require less manual intervention, and help that is always available.

Manjaro Linux

This open-source distribution is suitable for users new to the computer world as well as experienced ones. Many people use it for linux gaming.

It have many features that makes it one of the best linux os for gaming.

Manjaro Linux Features –

  • Easy user interface
  • Stable
  • Configure with one click
  • Install anything from Software store
  • Community Support

Gamer Os –

Gaming OS GamerOS is an operating system that provides a comprehensive couch gaming experience. Start your favorite games right after installation by booting into Steam Big Picture.

You can install this operating system for gaming on linux.

Gamer OS

A computer that is installed with GamerOS becomes a mini-console. In addition, Steam Buddy allows you to play non-Steam games as well.

There’s no question that on this list you’ll find the most complete Linux Gaming distro available.

Gamer OS Features –

  • Easy to install
  • Minimal
  • Always up to date
  • Use any controller
  • Play any game

Solus –

Solus OS basically designed for home computing. If you are looking for an easy to use operating system then you can use this.

Many gamers use it for gaming on linux. It have many features to play games on linux.

Solus OS

The gaming experience is improved by the integration of Steam with Solus. For better performance and integration, Solus disables Steam’s runtime and uses its own.

Additionally, Solus is an independently developed Linux distribution. You can choose from Budgie, Mate, or GNOME version of this free and open source OS.

Solus Features –

  • Different Desktop version
  • Easy to use interface
  • Install any software from software store
  • Community support

Lakka Linux –

Lakka Linux is not like nay other regular linux distribution. It can transform any small computer into retro gaming console.

When it comes to hardware, Lakka Linux supports PC, Raspberry Pi, CuBoxi, HummingBoard, Odroid C1, UDOO, Banana Pi, etc.

Automatic joystick configuration is supported by this lightweight gaming distro. Besides multiplayer and shaders, it offers netplay, rewind and save states as well.

Lakka OS Feature –

  • Easy to use interface
  • Light weight linux experience
  • Many retro games to choose
  • Optimized for many Emulators

Ubuntu –

Ubuntu is the most popular linux dekstop distribution. If you are looking for best os for gamin then you can choose ubuntu.

You will not get features like Pop!_OS. But It has lots of feature. You can find some GNOME extension to get similar features. If you are looking for best operating system for gaming pc then You can use this.

Ubuntu OS

As long as your hardware configuration is decent, both Pop!_OS and Ubuntu should be great choices. Ubuntu has big community for support. You can find solution easily if you face any problem.

Ubuntu Features –

  • Easy to user interface
  • Stable
  • Install software from Software store
  • OTA updates
  • Secure Boots
  • Full Disk encryption
  • Community supports

Super Gamer –

Linux-based SuperGamer has been re-packaged as a Live DVD based on Ubuntu.

The original version was based on Vector Linux and PCLinuxOS. Additionally, it claims to be the world’s first Dual Layer Live DVD.

Super Gamer OS

There are both shareware and free games on it, making its ISO file 7.9GB in size.SuperGamer can also be downloaded and installed on a PC’s hard drive by those who are interested.

Super Gamer Features –

  • Many Games Added In The OS
  • Created for Live DVD usage
  • Access to Ubuntu software repositories

Drauger OS –

It is Ubuntu-based linux gaming distro.This operating system has lots of feature for gaming.

You can check this operating system if you want to play games on linux. It is one of the best linux os for gaming.

Drauger OS

The Drauger operating system is designed to balance performance and security.

Besides offering users a pleasurable gaming experience, they strive to make it safe and secure.

Drauger OS Feature –

  • Easy to use UI
  • Better Graphics performance
  • Security
  • Community support

Garuda Linux –

Garuda Linux has all the features you need to play games on linux. If you are looking for best operating system for gaming pc then you can use this operating system.

This Linux distribution offers more gaming features than any other on this list.The distro runs the Plasma desktop environment and is based on the Arch architecture.

Garuda Linux

One of the best feature of this distribution is the Zen Kernel, which offers faster performance and better gaming performance.

Garuda Linux Features –

  • Easy Installation
  • GUI for package management
  • GUI for Kernel and Driver management
  • Custom Zen Kernel
  • Lots Of Desktop Environment
  • Extra Gaming Features

Linux Mint –

Linux mint is a modern,easy to use,comfortable operating system. It is based on Debian and Ubuntu.

Linux Mint

It is one of most popular desktop linux distribution. You can use this linux distribution for gaming.

Linux Mint Features –

  • Easy to use UI
  • Community driven operating system
  • It has best software manager
  • It gets regular updates

You can choose any of this best linux distro for gaming. Some of have dedicated features for gaming and some used for multipurpose work.

If you want a operating system for gaming then choose the Garuda or Dragur OS.

There are other light weight linux gaming os. Check our gaming os list for more deatils.

Some times you need a operating system for daily work and also need it for gaming. You can check this linux gaming os and use which have all your requirements.

So which one you want to use or already using for gaming on pc. Let us know in the comments bellow.

Get more post like this,visit our website and follow our facebook page.

You can also check this post Best Linux Distribution For Gaming.

Continue Reading

Shell Scripts

Basic Shell Script Examples In Linux

Published

on

By

shell script example

Shell script examples in linux covers some of the basics of shell scripts.This example contains basic commands on linux.

If you are looking for basic shell scripts then this article is for you.

Shell Script For Showing Two Numbers Entered By User:

In this example we have define two variables.This two variable will take two vales from user.The “echo” command used for display the output.The $ sign fetch values from variable when we use it on echo command.

read a
read b
echo $a
echo $b

Shell Script For Addition Of Two Values Entered By User

In this example a and b are two variables.The x variable used for storing the addition.We use backcode “`” to execute a mathmetical expression.

echo Enter Two Numbers
read a
read b
echo The Numbers You Have Added: $a,$b
x=`expr $a + $b`
echo The Sum Is : $x

Shell Script For Checking Two Numbers Are Equal Or Not:

read a
read b
if{[$a -eq $b]
then
    echo They Are Equal
else
    echo They Are Not Equal
fi

You can also use this script to find the gretest value in two numbers.

read a
read b
read c
if[$a -gt $b -a $a -gt $c]
then
    echo A is greater
elif [$b -gt $a -a $b -gt $c]
then
     echo B Is Greater
else
    echo C Is Greater

Printing Numbers For A Particular Range

echo Enter Two Ranges
read m
read n
i=$m
while [$i -le $n]
do
   echo $i
   let i=i+1
done

Division Of Two Numbers:

echo "Enter Two Numbers"
read a
read b
t=`expr $a / $b`
echo "The Division Is"
echo $t

Find Factorial Of A Number:

fact=1
echo "Enter A number"
read n
while [$n -ge 1]
do
fact=`expr $fact\ $n`
n=`expr $n-1`
done
echo "The Factorial Is $Fact"

This are some of the basic examples.For more shell script examples bookmark us.For more contents like our facebook page.

This Linux command may also useful

25 Basic Linux Commands For Beginners

Continue Reading

linux

What is ls command in linux?

Published

on

By

What is ls command in linux?



ls is a linux command that used for listing directory and folders.

If you use ls comand it will list the folders and directories of folders.

Continue Reading

Trending