Basic Linux Commands for Beginners

Linux is an operating system which enables you to manage all of the hardware resources associated with it. It is comprised of different parts like the bootloader, the kernel, daemons, the shell, graphic server, desktop environment, and applications. Linux is one of the finest and reliable operating system which provides you the perfect results. Some Basic Linux commands for Beginners are here. There are many Linux distributions available in the market and few of them are:

  1. Red Hat Enterprise Linux
  2. Ubuntu
  3. Fedora
  4. Debian
  5. Arch Linux
  6. Mandriva Linux
  7. Kubuntu
  8. CentOS
  9. Linux Mint
  10. Zorin

Basic Linux commands for Beginners

Linux commands for beginners

Various commands are used in Linux operating system to ask the system for various functions. Linux’s shell the basic program which receives the commands from the user, and passes it to the Linux which ultimately provides you the output. Here, we are presenting you some of the Basic Linux commands for Beginners that can help the users especially for the beginners in processing various functions.

Read More – Cloud Computing Tutorial for Beginners

Read More – How to Make Bootable Pendrive

Read More – Bluestacks Alternatives

 

Linux Commands for Beginners with Description

  • alias Command: – It helps in converting complex commands or group of commands into the simpler one by just entering a particular set of pre-set string.

 

  • Bzip2/ bunzip2 Command: – This command helps in compressing the files like gzip or gunzip.

 

  • Bzcat/ bzmore: – The files being compressed by bzip2 commands are being displayed by using this command.

 

  • cal Command: – This command is used to display the calendar for specified year, month and date.

cal Command

  • cat Command: – It is a multi-function command which is basically used to display the content of the file. You can easily add various options to create various functions with the help of this command. Some of the options are:
    • cat > [filename] is used for creating a file.
    • cat [oldfile] > [newfile] is used to copy content from the older file to the new file.
    • Cat [file1 file2…..] > (new file name] is used to add the contents of multiple files into a single one.
    • Cat –n/cat –b [filename] is used for displaying the line numbers.
    • Cat –e [filename] is used for displaying $ character at the end of each line.
    • Cat [filename] <<EOF is used as an end page marker for a file.

cal Command

  • cd Command: – cd means change directory. As the name indicates this command is used for changing the current directory.

cd Command

  • chage Command: – This command is used for setting an expiration date for an user account.

chage command

  • chgrp Command: – This command is used for changing the group of the user on which he/she is working.

 

  • chmod Command: – This command helps in the execution of a file or directory and also helps in chanding the permissions granted to it.

chmod command

  • chown Command: – This command can easily change the owner of the file or directory to which it belongs. You can easily edit and make changes to the owner of the file by using this command.

 

  • chsh Command: – This command is used to change the shell.

chsh command

  • clear Command: – clear command helps in clearing or deleting the terminal of the file for future use.

clear command

  • comm Command: – This command is use for making comparison between two files or streams.

 

  • cp Command: – cp means copy. This command is used for copying whole content from one file or directory to other.

cp command

 

Read More – Best IT Certifications Courses

 

  • cut Commands: – As the name indicates, this command is used for cutting and displaying the desired column from a file or directory.

 

  • date Command: – As the name indicates this command is used for displaying current date on the existing file or directory.

date command

  • df Command: – This command is used for checking the disk space used in file. This command fully describes the number of blocks used and available in the file.

df command

  • echo Command: – echo command is used for displaying the values of variables on the terminal. You can also check the value of a variable with the help of echo command by using $ sign with it.

 

  • exit Command: – This command is used for exiting you from the current user group to the last user group.

exit command

  • export Command: – As the name indicates, this command is used for exporting shell variables to the other shells.

 

  • file Command: – file command is use to determine the kind of file with various options.

 

  • find Command: – This command is used for finding desired files in a directory. You can also find file names with their similar name pattern.

 

  • gpasswd Command: – This command is used for transferring membership of a group from one user to another.

 

  • grep Command: – This command is used for filtering text lines from a file with the help of a string.

 

  • groupadd Command: – As the name indicates, this command is used for creating or adding a new group to the existing file.

 

  • groupdeal Command: – As the name specifies, this command is used for permanently deleting the entire group.

 

  • Groupmod Command: – This command is used for modifying the name of the group.

 

  • groups Command: – This command is used for displaying the current group of the user.

 

  • gzip/ gunzip Command: – This command is used for compressing and decompressing a file size.

 

  • head Command: – This command is used for displaying ten starting lines of the file.

 

  • tail Command: – Just like a head command, the tail command is also used for displaying the last 10 lines of the file.

 

  • history Command: – This command is used for displaying older commands from the shell command history.

history command

  • WC command: – This command is used for counting lines, words, and letters of the input command.

 

  • histsize Command: – This command is used for determining the number of commands going to be stored in the file in the current environment.

 

  • histfile Command: – This command is used for displaying the history of the file.

 

  • histfilesize Command: – This file is used for setting the number of commands in an older file.

 

  • id Command: – id command is used for defining the user’s id in the user system.

id command

  • less Command: – This command is used for adjusting the content according to the width and height of the terminal.

 

  • more Command: – This command is used for displaying file one output screen at a time.

more command

  • locate Command: – This command is used for finding the location of a file in a database.

 

  • ls Command: – This command is used for making a list of all the files present in a directory.

ls command

  • man Command: – You can easily display the page for a specified command manually by using this command.

man command

  • mkdir Command: – This command is used for creating a whole directory in the user system.

mkdir command

  • mv Command: – This command is used for renaming files and directories in a user system.

mv command

  • od Command: – This command helps in displaying content of a file in octal format.

od command

  • passwd Command: – This command helps in setting a password for a user group to enhance the privacy settings.

passwd command

  • PWD Command: – ‘PWD command’ means print working directory. This command is used for displaying the location of the working directory on which the user is currently working on.

pwd command

  • nano Command: – This command is used for editing the text of the whole line.

nano command

  • tee command: – This command sends and display the output to both file and terminal of the directory so that you can easily get the desired results.

 

  • PS1 Command: – This command is used for changing the name of the prompt in the terminal.

 

  • rename Command: – As the name indicates, this command is used for renaming more than one command on a single time.

 

  • rm Command: – This command helps in removing a whole file from the user directory.

rm command

  • rmdir Command: – This command helps in removing a whole directory from the user system.

rmdir command

  • Whoami Command: – This command is used for displaying the name of the user of the command.

whoami command

  • Whatis Command: – This command is used to getting the full one line description about the command.

 

  • set –o noclobber Command: – This command is used to prevent the overwriting in the opened files.

 

  • set +o noclobber Command: – This command is used for allowing overwriting of the opened files.

 

  • set –u Command: – All the variables need to be predefined before adding the command to the file. If you have some undefined variables then you can easily declare these variables as errors by using this command.

 

  • set +u Command: – If you don’t want to display anything about the undefined variables of the file then you can easily do it with the help of ‘set +u’ command.

 

  • set –x Command: – This command is used for displaying the whole expansion of the shell involved.

 

  • set +x Command: – This command is used for disabling the expansion of the shell.

 

  • sed Command: – This command is used as a stream editor which helps in editing various files by using regular expressions. These editings are not permanent, as they remain in file for the time file displayed and does not affect the actual content of the file.

 

  • sleep Command: – This command enables the terminal to wait for the specific period of time.

 

  • sort Command: – This command is used for sorting all the content present in the file in an alphabetical order.

 

  • su Command: – If you want to use the same shell as another user, you can easily do it just by using ‘su’ command.

su command

  • sudo Command: – This command enables you to run the same program with the features of the other user.

 

  • tac Command: – This command is exactly opposite to the cat command and displays the contents of the file in opposite order.

 

  • time Command: – This command is used for displaying the current time on the terminal.

time command

  • touch Command: – This command is used for creating an empty file in contact with the other file which is really not in existence.

 

  • tr Command: – This command is used for translating the desired characters into simpler language.

 

  • type command: – This command is used for displaying the detailed information about the typed command.

 

  • uniq Command: – This command is used for sorting and displaying the repeating lines.

 

  • unset Command: – As the name indicates, this command is used for removing or unsetting the variables from the shell.

 

  • Useradd: – This command is used for adding new users to the file or directory.

useradd command

  • Userdel: – This command is used for deleting the existing users from the file or directory.

userdel command

  • Usermod: – This command is used for modifying the properties of the users.

 

  • Vi Command: – This command is used for opening the vi file editor for writing a program.

vi command

  • W Command: – This command is used for getting the detailed knowledge about the user and their working.

 

Read More – Best iOS Emulator for PC

Read More – How to Remove Shortcut Virus

 

Tips and Tricks for using Linux Command Line

Linux is a wonderful operating system in which you can easily do various functions by using few simple commands. Sometimes these commands appear to be difficult for creating some functions. If you see some difficulties in creating some functions, you can easily use some tips and tricks in Linux Command Line for simplifying your work.

  • If your terminal gets filled up with various commands and you are not finding any free space to add more, you can easily remove the previous commands by just using ‘clear’ command.

 

  • You can use ‘Tab’ button for completing the abbreviations used while writing the commands.

 

  • You can easily stop or force stops any commands in the terminal by using ‘Ctrl + C’ and ‘Ctrl + Z’ commands. These commands help in safely stopping the previous commands without affecting other operations of the file.

 

  • If you want to make the safe exit of the terminal you can easily do it with the help of ‘exit’ command.

 

  • If you are facing any difficulties in the command prompt and you wanted to power off or reboot your system then you can easily do it anytime by just typing the ‘sudo halt’ and ‘sudo reboot’ commands. The best part of using these commands is that you don’t need to exit the command prompt for operating these functions.

 

  • You can use ‘help’ option with any command to determine the full summary of the typed command.

This is the article on Basic Linux commands for Beginners so we hope that you learn from this article. We will update this article time to time and we will try to provide you better guidance related to linux. There will be many more articles related Linux so check other articles related to Linux. If you really like this article then share it on Social media like Facebook, Whatsapp, Twitter, and on other media sites too.

About Nikhil Gupta

I am a self-trained guy, a part time blogger and computer experts from last four years. I am very much passionate about blogging and my main area of interests are SEO, Digital Marketing, Internet Marketing, Web Designing, Business knowledge, Linux and Cloud Computing.

Comments

  1. Amazing guidance

  2. Ashima Gupta says:

    Useful Article for beginners. Keep up the good work.

  3. Useful Article for beginners. Keep up the good work.

  4. thanks for it

    very well explained

Speak Your Mind

*