jump to navigation

Power of Wonderful Linux Terminal – 10 Challenges for Windows Users October 1, 2008

Posted by askgel in Linux, Software, Terminal.
Tags: , , , , , , , , , , , ,

Enough said about Linux being free. You shouldn’t use anything just for the reason that it’s free. This post is for those Linux users who underestimate the power of Linux Terminal and for those Windows users who thinks that Linux is useless.

Whatever you can do with the help of frontend GUI can be done ‘easily’ from Linux Terminal, and sometimes even more than what GUI can do. To do the same tasks in Windows, you often need to download and then install bloated software, only to slow down your computer. The chances of malware or spyware coming with those software as bonus are also there. Linux Terminal is a powerful tool and many difficult tasks can be easily done with a single line command. No need to search Internet for software, no need to install bloated software, and no need to spend your pennies. Yes, there is a learning curve involved in getting the things done with Linux Terminal but if you learn something it will be you who will be benefited. Those die-hard Windows fan are like those handicaps who are happy with ready-made food. Consider this- you are given all the tools, the dishes, and ingredients for making food. Would you like someone to come and cook the same old food always without letting you know what ‘shit’ he mixes with the food, and also never cares for your taste? Or would you prefer to learn some recipe yourself so that you can cook the food of your taste?
Enough theory! Let’s get started. Here I challenge the Windows users to get these things done in Windows in fast and efficient ways; not just the command prompt, they can use frontend GUI too. Those people Linux users who hate Linux Terminal should also learn a lesson or two from these.


Challenge #1 Browse and display images in Terminal

Wtf! Browse and display images in Terminal? Is this possible? Yes it is! To browse the images in the current directory:
$ sudo zgv
To browse the images in /home/username/pictures directory:
$ sudo zgv /home/username/pictures

Note: If you get any mouse not initialized message, just unplug your mouse, run zgv and plug your mouse back

Challenge #2 Burn a CD/DVD/BluRay Disk

Windows users might think that this is as easy as copying and pasting a file into CD/DVD writer folder. But let’s add a twist; make an ISO image of a large folder and burn them to a CD/DVD. Windows users can download a Trial Version of Nero while Linux users can finish this challenge:
Crate an ISO image (myISOFile) out of a folder (or filename)
$ mkisofs –r –o myISOFile.ISO folderOrFilename
Now burn the above ISO image to a CD/DVD
$ cdrecord --device=cdwriter-device -tao -eject myISOFile.ISO
Windows users if you are back after downloading and installing a heavyweight disc burner then let’s move to another challenge

Challenge #3 Create ASCII text graphics

What about creating some ASCII graphics such as the following? You can paste it in your email as a signature to impress your friends.

 _     _
| |   (_)_ __  _   ___  __
| |   | | '_ \| | | \ \/ /
| |___| | | | | |_| |>  <
|_____|_|_| |_|\__,_/_/\_\

$ figlet Linux
This is displayed with the default font, to use other fonts, give a font name after switch f:
$ figlet quick tweaks –f script

                      _                            _
             o       | |                          | |
 __,             __  | |    _|_          _   __,  | |   ,
/  |  |   |  |  /    |/_)    |  |  |  |_|/  /  |  |/_) / \_
\_/|_/ \_/|_/|_/\___/| \_/   |_/ \/ \/  |__/\_/|_/| \_/ \/

$ figlet Quick Tweaks –f script
  _ \       _)      |    __ __|                   |        
 |   | |   | |  __| |  /    |\ \  \   / _ \  _` | |  /  __|
 |   | |   | | (      <     | \ \  \ /  __/ (   |   < \__ \
 \__\_\\__,_|_|\___|_|\_\  _|  \_/\_/ \___|\__,_|_|\_\____/

The fonts for figlet are installed in /usr/share/figlet directory

Challenge #4 Run remote applications in full GUI mode

Being a computer science student, I often need access my lab computers (which have Fedora installed) through SSH. After I submit my assignments, esp. those GUI based programming assignments, I wanted to check if everything is fine. Accessing remote computer is easy:
$ ssh username@example.com
If you want to run remote applications such as OpenOffice or Eclipse, just uncomment ForwardX11 yes in /etc/ssh/ssh_config file. After that if you type, eclipse, for an example, the remote application will be running in full GUI mode.

Challenge #5 Split a large file into several pieces

If you have a large file of about 1 GB size and have two CDs to spare, how can you carry that 1GB file? Windows users any idea?
$ split –b500m myBigFile mySmallFIles.
To join the smaller files to get the big files back:
$ cat mySmallFiles.* > myBigFile

Challenge #6 Take screenshot and save it as png file

Windows user might have got some relief to have this challenge because it’s just about pressing PrintScreen key on the keyboard, opening up MSPaint, pasting, and saving as .png. Phew! Don’t you guys get tired? Anyways, I appreciate that you guys did it. But wait! Let me add a little twist – How about taking a screenshot of a rectangular area on your screen?

My Screenshot

Screenshot taken with import command

$ import –frame myScreenShot.png

After this command, the mouse pointer changes to a set of cross-hairs; left-click and drag the mouse across an area of the screen and release the mouse to capture the selected area.

Challenge #7 Resize an image, put a border around it, and add a comment

That should be enough for the day for Windows users, but Linux users aren’t that lame. Move on!
$mogrify -geometry 300x200 -border 8x8 -comment “Windows SucksmyScreenShot.png

Challenge #8 Add sound effects to a sound file such as chorus, echo, flange etc

Well, I think this challenge is going to be an annual project for Windows users, so let me not be so strict. What about this – convert a wav file into mp3?
$ lame myMusicFile.wav myMusicFile.mp3

Challenge #9 Display a nicely formatted calendar for a particular year

$ cal 1972

Challenge #10 Mirror a website to browse the site offline

This is a very common challenge; mirror a website to your local computer for offline viewing experience:
$ wget -mk http://example.com

This is the end of 10 Challenges. BTW What about doing some Math? Factorial of 10 please! (Windows users can use pen and pencil, just like those high school days)
$ calc fact 10

I hope at this point Windows users have successfully downloaded and installed Ahead Nero and those with latest Intel CPUs and 4GB RAM might have burned a CD too. Linux users have already completed 10+1 challenges.

This is just the tip of the iceberg. Linux Terminal is much powerful than this. You might haven’t realized the power of Linux Terminal and might have always hated it. It’s so sad that Linux gets hatred because of its powerful and wonderful virtue. Format your C: drive, install any Linux flavor, learn some commands, and live a geek life!

If you know any powerful and wonderful Linux commands, let us know in the comments.




1. Power of Wonderful Linux Terminal - 10 Challenges for Windows Users - October 1, 2008

[…] Go to the author’s original blog: Power of Wonderful Linux Terminal – 10 Challenges for Windows Users […]

2. VGH - October 2, 2008

This is so Cool !. Love it.

3. Danilo M - October 2, 2008

Nice tips, but the challenge #10 should be

$ calc 10!

and not

$ calc fact 10


4. Kevin - October 2, 2008

IMHO four of the best are:
grep, cut, head & tail

5. mojo - October 2, 2008

it seems that nobody ever mentions that the linux command line is not NEARLY as hard as people percieve it to be. a little help does go a long way, though….

like with the windows command line, most commands have a built in cheat-sheet type help display. on windows it might be

C:> command /?

or on Linux (or any Unix-like system) it is probably

~$ command –help


~/$ command -h

to get some quick help. But on Linux (and other Unix-like systems, but I’m gonna stop repeating that every time) almost every command you can type also has a manual page associated with it that you can bring up which has even more detail and often examples of common uses. On many systems there is also another help system called info. So you may be able to try

~/$ man commandname


~/$ info commandname

Now i’ll admit that the info system takes a second to learn how to navigate, but once you do it’s worth it!. Info is nice because it puts you in a program that lets you browse through the database including other commands, and page through them. But it doesn’t seem to cover as much as the man pages. Problem with the man page might be, at first, that it just flys by the screen and you don’t get to read it all. Often there is so much there detailed out.

But Linux has a really REALLY useful feature that helps in this small instance, and also makes many, many very powerful things possible. The man program spits out a bunch of text, right? Well LOTS of command line programs spit out some form of data, usually text. Linux lets you re-direct that output and make it the INPUT of another program. the “more” program (or less, an enhanced version that does more than ‘more’, but has the clever name because ‘less is more’. Sort of a triple entendre. Geek humor, but i digress…) is basically a “pager”. It takes input text, and prints it to the screen but pauses at each screen-full so you can read it and lets you press a key when you’re ready to read on. It gives you a “More?” prompt, get it? It’s really easy to do. Just use the pipe symbol at the end of your command and then put the command after it which will accept the first ones output as it’s input…..

~/$ man command | less

and viola! the manual page is on screen and there is a prompt for you when you’ve read far enough and are ready to move on. The less program even lets you page back if you missed something. and, just to be nice, the program will clear the text off the screen when you’re done and put you back at the command prompt where you can still see the previous commands you typed up to that point. thoughtful.

But it gets better than that. Say you need to see some error messages from a particular program to troubleshoot something. maybe i want to see all the logged error messages from the DHCP daemon (background server process).

~/# dmesg | grep dhcp | less

this will spit out the error messages with dmesg, but that is a HUGE text file that will take perhaps several minutes to finish spitting out to your screen. So we filter it with grep (a handy tool) so that only lines with “dhcp” in them print. It’s still probably a lot of lines, more than the screen, so we’ll page it using less.

learning about the powerful help system and a few tricks like pipes can really make the Linux command line a lot less daunting and still very powerful even for a beginner. even pros use the –help probably daily on some command or another. and a few other niceties like tab-completion and command line history and editing can save you from having to type nearly as much as you would without them.

happy hunting and pecking!

6. Neo - October 2, 2008


7. Meis - October 2, 2008

Really? These aren’t “core” commands like you’re trying to pawn them off as. All but number 5 are “third party” add-ons that are not necessarily there by default. Yes, there are ways Linux is better than Windows, just as the opposite is true, but next time make sure your not judging by a double standard.

8. Meis - October 2, 2008

Oh, and by the way, cat and split (number 5 on your list) are part of Windows command shell as well. Meant to put that in the original post, sorry for the extra posting.

9. sillyxone - October 2, 2008

A real life situation: my wife was watching online movie and left a less-than-56K-modem-connection for me on our DSL 1.5Mbps connection.

I noticed the movie finished filling its buffer way before the it reaches half of the playing time. So wondershaper to the rescue:

sudo apt-get install wondershaper
sudo wondershaper wlan0 1000 1000

and I can browse the web smoothly while she watches her movies. I added a shortcut on the panel (with gksudo) so that she can limit her usage with one click.

I couldn’t pull anything out of my head to do the same thing on Windows.

Also, if you start adding challenges that involve regex (grep, sed, batch renaming …), it would make the list way longer.

10. Wes - October 2, 2008

This is Awesome stuff! I’ve been using Linux for 8+ years now and a few of those were still news to me… Or maybe I’m just old and forgot… now where did I put that mouse again?

As for the comments from “Meis”, as far as I’m concerned, if it’s in the distro’s package repos, then it’s part of the “core”.

It’s no different than plugin functionality in Excel that doesn’t get loaded unless you ask for it (Ex: the analysis engine/toolkit?). Or would you say that’s not part of Excel???

11. Dennis - October 2, 2008

I’m not a Microsoft guy by any means (except it’s my job) I run Linux at home. But after install either the “Windows Server 2003 Resource Toolkit” or the “Windows Server 2003 Support Tools” (yea, confusing and who knows). One of them has both CDBURN.exe and DVDBURN.exe (two different programs) but the syntax is a little easier than cdrecord for burning a cd/dvd as far as syntax is concerned.

CDBURN C:\Path\To\Iso.iso

Other than that, you make great points. I use the linux command prompt almost every day even if i just use it to output a 100 different commands because the syntax for windows sucks. (i.e., for i in `seq 1 100`; do echo move file$i.txt.log.crap file$.txt).

I know there is a loop command for window but its so easy to remember just the one (linux).

12. Alvare - October 2, 2008

Just saying “sed” or “awk” was enough….
Winchot users cant even dream of using this magical/infinite languages (i guess there may be a winchot version, but whitout bash this 2 are completely useless)

13. Juan Pablo Angamarca - October 2, 2008

Open a Terminal window and write “fortune”

$ fortune

You’ll get a sometimes encouraging, others disconcerting, others funny, or deep-thought message, it could go like this:

juanpablo@fmg-m003:~$ fortune
You will receive a legacy which will place you above want.
juanpablo@fmg-m003:~$ fortune
You’re not my type. For that matter, you’re not even my species!!!
juanpablo@fmg-m003:~$ fortune
You’re not my type. For that matter, you’re not even my species!!!


14. Website Programming - October 2, 2008

There were other options, such as keeping LILO on a floppy and booting from that when you wanted to use Linux, but they weren’t very convenient. Website Programming

15. Dan - October 3, 2008

In addition to previously mentioned awk, grep, sed, what about ln?

Windows does not have a real shortut solution. Have you ever tried to use a shortcut from the command line?

C:\Documents and Settings\a\Desktop>dir Projects*
Volume in drive C is 6910PSS0C
Volume Serial Number is 900F-5D0B

Directory of C:\Documents and Settings\a\Desktop

06/27/2008 10:54 AM 709 Projects.lnk
1 File(s) 709 bytes
0 Dir(s) 46,844,391,424 bytes free

C:\Documents and Settings\a\Desktop>cd Projects.lnk
The directory name is invalid.

C:\Documents and Settings\a\Desktop>cd Projects
The system cannot find the path specified.

16. Daniel - October 3, 2008

Windows does (sort of) ^^:
#1: Hard to geht Windows without gui, so opening picture in terminal opens the file. However there’s no way to display it in terminal.

#2: Mkisofs works on windows too ^^. Btw. there is a free power-toy from MS to make ISO’s

#3: Wouldn’t know there is a command-line tool to do that (but never looked for it)

#4: Command is called: mstsc

#5: That’s a task for WinRar (free archivier).

#6: Vista has a tool for that but don’t know if it supports png

#7: Paint ftw ^^

#8: Lame works on windows, too ^^

#9: Click on calender on the right bottom (in vista)

#10: Oh come on, offline files work since 2000!

Still, Linux rocks !

17. Daniel - October 3, 2008

#10+1: Windows Calc in scientific view does that ^^

18. links for 2008-10-03 « My place - October 3, 2008

[…] Power of Wonderful Linux Terminal – 10 Challenges for Windows Users | Quick Tweaks Enough said about Linux being free. You shouldn’t use anything just for the reason that it’s free. This post is for those Linux users who underestimate the power of Linux Terminal and for those Windows users who thinks that Linux is useless. (tags: linux cli shell command line interface bash ubuntu) […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: