November 26, 2009 | In: Linux, Terminal

10 Linux commands for fun

Here are few Linux commands you can play with for fun. Some of these might be helpful in certain situations but I’ve compiled them here so that you can play with it, appreciate the power of Linux commands, or just show off your Linux skills to your friends.

Let me warn you first – these commands are not for newbies, those who just started using Linux or for those who want to start with Linux terminal.

#1 Browse and display images in Terminal

Browse and display images in Terminal? Yes! 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, type zgv and plug your mouse back

#2 Burn a CD/DVD/BluRay Disk

Llet’s add a small twist; make an ISO image of a large folder and burn them to a CD/DVD.
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

#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

#4 Run remote applications in full GUI mode

As 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 run in full GUI mode.

#5 Split a large file into several pieces (for easy copy)

If you have a large file of about 1 GB size and have two CDs to spare (or two thumb drives of 512 MB each), how can you carry that 1GB file?
$ split –b500m myBigFile mySmallFIles.
To join the smaller files to get the big files back:
$ cat mySmallFiles.* > myBigFile

#6 Take screenshot of a rectangular area and save it as png file

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.

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

$mogrify -geometry 300x200 -border 8x8 -comment “Windows SucksmyScreenShot.png

#8 Quickly converting a .wav file to a .mp3 file

$ lame myMusicFile.wav myMusicFile.mp3

#9 Display a nicely formatted calendar (or doing some quick maths?)

$ cal 1972

Get the factorial of 10

$ calc 10!

#10 Mirror a website to your computer for offline browsing

$ wget -mk http://example.com

No related posts.

4 Responses to 10 Linux commands for fun

Avatar

GoblinX Project » GoblinX Newsletter, Issue 228 (11/29/2009)

November 29th, 2009 at 5:54 am

Avatar

Links 29/11/2009: New Linux Mint Released | Boycott Novell

November 29th, 2009 at 7:27 pm

[...] 10 Linux commands for fun [...]

Avatar

Weca Ngo

November 5th, 2010 at 1:55 pm

I like #6! and if you are working in a gui where eog is your Eye of Gnome you can add
&& eog testscreen.png to immediately view the result.

import -frame testscreen.png && eog testscreen.png

Thanks for the other too. I've sampled the border command and will probably use it frequently.

Avatar

outslider

October 31st, 2011 at 5:54 pm

Instead of:
$ cat mySmallFiles.* > myBigFile
shouldn't be:
$ cat mySmallFiles.* >> myBigFile
?

I guess with single > the myBigFile will be overwritten with every SmallFile. That's just a guess, I'm not going to check this now.

Comment Form

Categories

Send Your Tips

If you have any Tips you like to share, send an email to tips@quicktweaks.com

Your Ad Here

Looking for a place to put your ad? You have come to the right place. We have this place empty just to hold your ads.

Tweaks by Dates

November 2009
M T W T F S S
« Jan   Feb »
 1
2345678
9101112131415
16171819202122
23242526272829
30