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:
- 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.
- Many of efficient and easy commands make the usage mouse free (you may look like a hacker...working everything with commands.)
- 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#
Here are some of my coding snippets in Gedit:
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:
- sudo (SUper User DO) : 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.
- cd (Change Directory) : cd [dir] changes the current directory to dir.
- ls (LiSt) : 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
- man (MANual) : 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.
- mkdir(MaKe DIRectory) : 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.
- exit/logout : 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.
- passwd (PASSWorD) : This command is used to change your current user password. You need to know your current password in order to change it to new.
- ifconfig (network InterFace CONFIGuration) : 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.
- poweroff : 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:
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"]
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.
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
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.
Manual page for clear command
clear is a command used to clear current terminal window, the above screenshot shows manual page of the same.
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.
Changing password with passwd command.
Knowing your IP and other network configurations with ifconfig
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.)
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
For any CLI or Terminal related issue, feel free to contact me:
ReplyDeleteMayank 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