Skip to main content

LINUX TERMINAL

Mayank's Terminal MY TERMINAL WINDOW

What is TERMINAL?

Terminal is an interface in which you can type and execute text-based commands.

Why TERMINAL?

Terminal is a very powerful tool. It can be much faster to complete some tasks using a Terminal than with graphical applications and menus. Another benefit is allowing access to many more commands and scripts. Most computer users today are only familiar with the graphical user interface (GUI) and have been taught by vendors and pundits that the command line interface (CLI) is a terrifying thing of the past. This is unfortunate because a good command line interface is a marvelously expressive way of communicating with a computer in much the same way the written word is for human beings. It's been said that “graphical user interfaces make easy tasks easy, while command line interfaces make difficult tasks possible” and this is still very true today.

Examples:

  1. There ain't any need of setting a new environment for any type of programming. like CodeBlocks, Visual Studio, Anaconda or Jupyter Notebook (for Python): Are not at all required when you're equipped with Linux Terminal.
  2. Many of efficient and easy commands make the usage mouse free (you may look like a hacker...working everything with commands.)
  3. You get all languages' support in one editor: GEDIT; The list includes (but ain't limited to):
    • C
    • C++
    • C#
    • Java
    • Python
    • Golang (Google Go Programming Language)
    • JavaScript
    • Can code in HTML and CSS too
    • COBOL
    • Fortran
    • F#
  4. Here are some of my coding snippets in Gedit: Codes in C, C#, C++, Java, Python, and Go Codes in C, C#, C++, Java, Python, and Go

Using Terminal

Keyboard Shortcut: Ctrl+Alt+t Visit Using The Terminal for official Ubuntu documentation on using Terminal in Ubuntu.

Some Frequent Commands and their Description:

  1. sudo (SUper User DO) :
  2. For using it, simply type sudo in front of the commands requiring root user operation. This command is used to provide root user privilege to any command needing it. After giving a complete sudo command, we're required to enter our login password viz invisible but accepted by the terminal, this password is needed only one time per session(i.e. in the duration when you don't exit the terminal,) but "sudo" is to be typed before all commands requiring it. Using sudo to install screenfetch Using sudo to install screenfetch Sometimes we're working extensively on to the commands needing root user there, sudo -s can be used for becoming the root user and thereby avoiding typing sudo recursively. The following image shows that a normal user can't even access the 'root' directory but the root user can access as well as create and delete data from the same directory. [gallery ids="175,174" type="rectangular"]
  3. cd (Change Directory) :
  4. cd [dir] changes the current directory to dir. cd2 If you execute cd without specifying a directory, cd changes the current directory to your home directory. cd .. send you to the previous directory: This is how you navigate around the system. navigating through directories pwd (Present Working Directory) - Displays the present working directory name. If you don't know what directory you are in, pwd will tell you. using pwd Using pwd
  5. ls (LiSt) :
  6. It will show the full list or content of your directory. Just type ls and press enter key. The whole content will be shown. Like many Terminal commands, ls can be used with many available options such as -all, -l, -sort ls with -all option ls with -all, -l, and -n options The main difference between -all and -l is that prior shows hidden files(.odt) too whereas later shows only normal files in list form.
  7. man (MANual) :
  8. Terminal has about innumerable number of commands and one can't remember them all, so a user can request to display a manual page by simply typing man followed by a space and the argument which can be a command, utility or function.A manual page associated with each of these arguments is displayed. Understanding output of man command is a very handy technique for a regular user. Manual page for clear command Manual page for clear command clear is a command used to clear current terminal window, the above screenshot shows manual page of the same.
  9. mkdir(MaKe DIRectory) :
  10. With the help of mkdir command, you can create a new directory wherever you want in your system. Just type mkdir [dir name] , in place of [dir name] type the name of new directory, you want to create and then press enter. In the working directory there wasn't the directory named MAYANK, with mkdir MAYANK it is created. In the working directory there wasn't the directory named MAYANK, it's created with mkdir. Similarly, with the help of rmdir (ReMove DIRectory) command, you can remove an existing directory from wherever you want in your system. Just type rmdir [dir name] , in place of [dir name] type the name of the directory you want to remove and then press enter. previously existing directory "MAYANK" is removed with the help of rmdir command.
  11. exit/logout :
  12. The command is used to exit the terminal, or if you're logged in as root user (by using sudo -s) then to log you out from root to normal user. using exit command
  13. passwd (PASSWorD) :
  14. This command is used to change your current user password. You need to know your current password in order to change it to new. Changing password with passwd command. Changing password with passwd command.
  15. ifconfig (network InterFace CONFIGuration) :
  16. It is used mainly for setting the IP address and netmask of a network interface and disabling or enabling an interface. Simply type ifconfig to execute the command adn press enter. Knowing your IP and other network configurations with ifconfig Knowing your IP and other network configurations with ifconfig
  17. poweroff :
  18. The command is used to shut down your computer. An alternate to avail other logout options is gnome-session-quit --power-off this will show the following options to choose from: LOGOUT, SUSPEND, RESTART, SHUTDOWN LOGOUT, SUSPEND, RESTART, SHUTDOWN You can exit the dialogue box by pressing esc or by clicking at appropriate loactions(close icon or outside the dialogue-box.)
That's not IT!!!, Linux offers endless Oppertunities, that was not even a mere glimpse of it's extent. ENJOY LINUX.



MAYANK YADAV

Email: mayankyadavclasses@gmail.com

Don't forget to mention that you're following me on Blogger :-p

Also, follow me on:
LinkedIn: yadavmayank742
Twitter: yadavmayank742

Comments

  1. For any CLI or Terminal related issue, feel free to contact me:

    Mayank Yadav

    Phone: +91 9432065918
    Email: yadavmayank742@gmail.com
    Skype: yadavmayank742

    Don't forget to mention that you are following me on Blogger :-p

    Also follow me on:
    LinkedIn: yadavmayank742
    Twitter: yadavmayank742
    Instagram: mayanknyadav

    ReplyDelete

Post a Comment

Popular posts from this blog