Tip:
Highlight text to annotate it
X
hello some people ask us, why do Linux users use command line terminal a lot?
many of them believe that now is the 21st century and age of terminal has passed
and soon it will be put away.
if you think in this way, I hope this video changes your mind.
using command line is because of several reasons:
first of all it is because command line is so powerful. it supports everything you need.
you can download from a direct link
check md5 of downloaded file
extract files easily
install softwares
start and stop services
upgrade all softwares
kill processes
having access to your FTP account and upload to and download from it
open new URL in your browser
you can set it in a task scheduler
or force your browser to refresh the current page
you can change size and location of running windows
changing mac address
record screen
play the recorded video
or even watch a video in text-mode for fun
you can start, save or stop your virtual machines from command line and even schedule them
removing all metadata including GPS location from an image
resize an image or video
making DVD iso image from a folder or from other image formats
mount a DVD image
even though GUI is more convenient, its has a lot of limits
you cannot analyze the output results in GUI while you can do it in command line.
in command line you can store output results into variables and use them several times and
you can use pipe lines to cascade commands
terminal is more flexible. you can run some complex commands that cannot be run on GUI applications
for example you can check temperature of CPU and sent it as an email message
you can send messages about space on your hard disk, log files or other stuffs
your can run your commands on a folder recursively and implement regular expressions.
also you can use wild-cards such as asterisk or question mark
for example search a text within files of a folder recursively
regular expressions are useful to catch complex phrases such as special URL inside a web page
Downloading ranges of URLs is another advantage of command line
command line enables you to use switches which gives you variety of options
while in GUI too many menu items and options will distract you.
documentation and tutorial
In Linux forums instead of sending words such as right-click or menu items you see commands to be copy-pasted into your command line terminal.
you don't need to provide screen-shot of your errors and your tutorials too.
doing login into another computer via command line is easy and it needs very low band-with.
if you have worked with team-viewer via slow Internet connection, you may find Secure Shell very interesting.
command line also keeps history of commands that you have run before, as many as you set.
command line and varieties
unruly misuses
as you know, in Linux world users like anarchism and there are so many Linux distributions
although in different distributions the default GUIs are different, you can run most of commands of one distribution on the other one.
so if you are a fedora user you can help an Ubuntu user doing troubleshooting via command line.
while GUIs are always changing and it might have happened to you that old tutorials of a GUI software cannot help users of the latest release.
even sometimes GUI features are removed to make an application neater and it annoys the users.
but it happens to terminal commands less frequently.
Sometimes there is no GUI
in servers GUIs are unnecessary. they just consume RAM and the other resources,
bring vulnerabilities and open back-doors for hackers.
therefore GUIs are avoided in Linux servers.
sometimes graphic interface fails to run. in linux reinstalling the whole operating system is the last choice.
you can do trouble shooting via command line and use text-based web browsers
to receive help from the others.
you can even download anything you need,
burn it on a DVD or run multiple programs together.
terminal commands are powerful and robust.
they are less buggy than GUIs and they fail barely.
Efficiency
command line applications are very efficient.
they run very fast and since most of libraries
that small applications use are graphic libraries by making command line applications
you would avoid loading such a huge amount of codes.
you can make your own commands easily either by combining current commands or by writing applications in Python or the other languages.
in command line each command does a simple task so it is easy to make command line applications and
share responsibilities among all commands, while in GUI each application works separately and it is responsible for everything.
so each individual would not need a high level skill to make a useful application.
for example "cal" command in Linux shows calendar to you and i use "jcal" command to see the the Persian calendar.
the total size of this application is only 31KB.
but if the programmer of this application wrote it for graphical mode,
most of his or her efforts would be spent on its appearance instead of core functionality.
beside that, the user usually need
an icon of it on the desktop and that's why desktop of some
windows users are so messy.
many of command line applications in Linux are free. if they really need GUI,
other programmers can make GUI for them later.
culture and habits of users would affect programming.
sometimes by some unnecessary expectations we don't give chance to mediocre programmers.
making scripts
if you use a bunch of commands frequently, making script from them eases your works.
control flows such as if, for and while help you run your codes for all conditions.
if your script has to be run on a file or a folder, you can introduce it to nautilus file manager
as a nautilus script and you can call it on any file.
for example, i have a nautilus script which helps me crop images and another one which removes the whole meta-data of an image.
scripts can also be scheduled to be run at any specified time.
some facilities
in Linux,terminal does support tabs. it also supports drag and drop.
nautilus open in terminal is a plug-in which helps you run a terminal at the current location of your file manager.
you can use tab button to auto-complete your commands too.
nautilus terminal is another useful plug-in to have both GUI and command line in your file manager.
nobody can memorize all terminal commands and you are not an exception. my solution is to keep all necessary commands in tables
in an HTML file to have easy access to all of them.
thank you for watching this video and please do not forget to subscribe
if you have any word to add please leave it as a comment.