Author Archives: Himanshu Arora

About Himanshu Arora

Himanshu Arora is a software programmer, open source enthusiast and Linux researcher. He writes technical articles for various websites and blogs. Some of his articles have been featured on IBM developerworks, ComputerWorld and in Linux Journal. He is the administrator of the blog and also contributes useful posts on the blog. Visit his google+ profile or mail him at himanshuz.chd[at]MAILSERVER[dot]com (where MAILSERVER=gmail)

Top 10 Free Linux Games

If the term “Can I game on it?” has been bothering you while thinking to switch on Linux from Windows platform, then here is an answer for that – “Go for it!”. Thanks to the Open source community who has been consistently developing different genre games for Linux OS and the online content distribution platform – Steam, there is no dearth of good commercial games which are as fun to play on Linux as on its other counterparts (like Windows).

We present to you the list of 10 best free games for Linux for this year which have been selected based on their popularity, their free-to-play title, and easy installation.

NOTE – Interested in First Person Shooter games, read our article on 10 popular first person shooter Linux games.

1. Team Fortress 2

Team fortress 2

Team Fortress 2 is a team-based first-person shooter multiplayer video game developed by Valve Corporation, and is a sequel to the original 1996 Quake modification, Team Fortress. The game was first released on October 10, 2007 for Windows and the Xbox 360, and was later released as a standalone package for Linux on February 14, 2013. The game was announced in 1998, and was initially powered by Valve’s GoldSrc engine but the launch was much delayed due to updates in its design during its 9 years long development cycle. The game became a free-to-play title on June 23, 2011.

It has received critical acclaim and many awards, mainly due to its artistic direction, balanced gameplay, humour, and graphical style. Unlike other games with ultra-realistic graphics such as Call of Duty, Half-Life franchises, this game’s set up looks like cartoons brought to life.

Gameplay: Like the original game, Team Fortress 2 is set around 2 opposing teams; RED (Reliable Excavation & Demolition) and BLU (Builders League United), both competing for a combat-based primary objective.
Players can opt out of 9 character classes namely, Scout, Soldier, Pyro, Demoman, Heavy, Engineer, Medic, Sniper, and Spy, each one with its own unique weapons, strengths and weaknesses.

System Requirements:

Recommended Requirements

Minimum requirements

CPU

Pentium 4 or Athlon XP or better

Pentium 4 or Athlon XP or better

CPU Speed

3.0 GHz processor

1.7 GHz

RAM

1 GB

512 MB

Video Card

DirectX 9 compatible video card (NVIDIA GeForce 7900+ / ATI Radeon X1900+)

DirectX 8.1 compatible video Card (NVIDIA GeForce4+ / ATI Radeon 8500+)

Sound Card

Yes

Yes

Free disk space

5 GB

5 GB

2. Dota 2

Dota 2

Dota 2, a sequel to the Defence of the Ancients, is a multiplayer online battle arena video game developed by Valve Corporation. Dota 2 was released as a free-to-play title for Windows on July 9, 2013 and for Linux on July 18, 2013, and is available exclusively through Valve’s online content-distribution platform Steam. The game was applauded by video game critics, who praised it for its pleasing gameplay, improved production quality. Though it was also criticized for its steep learning curve.

Gameplay: A standard match of Dota 2 is independent and involves 2 opposing groups, the Radiant and the Dire, each team having 5 players. Both the teams occupy a stronghold at a corner of the map and located at each stronghold is a building named “Ancient”. In order to win, a team must destroy the opponent’s Ancient. There are 9 game modes and 107 “Heroes” in Dota 2 to choose from. Each player controls a “Hero” character and aims on levelling up, acquiring items, collecting gold, and fighting against enemy team to gain victory.

System Requirements:

Recommended Requirements

Minimum requirements

CPU

Intel core 2 duo 2.4GHz

Pentium 4 3.0GHz

CPU Speed

2.4 GHz processor

3.0 GHz

RAM

1 GB

1 GB

Video Card

DirectX 9 compatible video card with Shader model 3.0. NVidia 7600, ATI X1600 or better

DirectX 9 compatible video card with 128 MB, Shader model 2.0. ATI X800, NVidia 6600 or better

Sound Card

Yes

Yes

Free disk space

2.5 GB

2.5 GB

3. Urban Terror

UrbanTerror

Urban Terror, abbreviated as UrT, is a free-to-play multi-player FPS video game developed by FrozenSand. It was released as a free standalone game in 2007 utilizing ioquake3  (a game engine project to act as a clean base package for more advanced graphical and audio features) as an engine.

The official game motto’s ‘Fun over realism’ is true to its word as it is a well packaged product with  simple installation, adequate graphics, low requirements,  and a balanced gameplay, which makes it a unique, enjoyable and addictive game. Urban Terror was nominated to the 2007 Mod DB’s Mod of the Year Award.

Gameplay: The game billed as “Hollywood tactical shooter”, blends elements from games such as Quake III Arena, Unreal Tournament, and Counter-Strike. The realism in the mod is introduced through a number of changes like the weapons available are real-life, have recoil, are less accurate if fired while movement, and require reloading when a magazine has been utilized. Damage is also realistic such as wounds require bandaging, leg or feet wounds slow down the player.

System Requirements:

Recommended Requirements

Minimum requirements

CPU

Pentium 4  1.2 GHz or higher

Pentium 4  1.2 GHz

CPU Speed

1.2 GHz

1.2 GHz

RAM

512 MB

256 MB

Video Card

 NVidia or ATI card with 256MB or more

 NVidia or ATI card with 128MB RAM

HDD

50 GB or more

50 GB

4. Alien Arena 2008

AlienArena2008

Alien Arena is a standalone 3D first-person online deathmatch shooter video game based on source code of Quake II and Quake III, released by id software. The game developed by COR entertainment was released in October 2004, and has been free-to-play title since its commencement, with currently no plans to change it to pay-to-play format.

Features comprising new particle engine and effects, 32 bit graphics, reflective water, light blooms, high resolution textures and skins, stain maps, and more, make up for it to be an addictive game. This game has come a long way from its original version “CodeRED: Alien Arena”, with all new player characters, nearly 2 dozen new maps, new weapon models, and many substantial engine enhancements and optimizations.

Gameplay: Alien Arena features 37 levels, has fast and smooth gameplay with a high-tech atmosphere. The players can play online against one another or against the built in CodeRED bots, which feature multiple skill levels like rocket jumping and strafe jumping. The game also offers CTF (Capture The Flag), AOA (All Out Assault) modes, in which players can climb into vehicles to do battle, Deathball, and Team Core Assault.

System Requirements:

Recommended Requirements

Minimum requirements

CPU

Intel Pentium 4 1.7 GHz or AMD Athlon XP 1800

Pentium 3 @ 800MHz

CPU Speed

1.7 GHz

800MHz (or 1 GHz)

RAM

512 MB

256 MB

Video Card

BFG GeForce 7800 GS OC

NVIDIA GeForce 4400+ or ATI Radeon 8500+ (32 MB)

Video Memory

64 MB

32 MB

Sound Card

DirectX compatible

DirectX compatible

DirectX

9.0c

9.0c

HDD

500 MB

500 MB

5. Nexuiz

nexuiz

Nexuiz is an Arena first-person shooter 3D deathmatch video game developed and published by Alientrap on May 31, 2005, and is build on a modified Quake 1 Engine named DarkPlaces, whose features include Quake3bsp support, coronas, new particle effects, real time World and Dynamic lighting and shadowing, advanced menu system, and Md3 model support. It is intended to be played on the Internet or over a local network.

Gameplay: The gameplay is deathmatch with the most exorbitant possible speeds and weapons, providing extremely fast paced action. Other than deathmatch, there are several game modes like team deathmatch, domination, capture the flag, multiple mutators, and weapon options like rocket arena and instagib. Although, Nexuiz is mainly multiplayer but it includes a full single-player campaign, which lets one to play through various multiplayer game types and maps with bots.

System Requirements:

Recommended Requirements

Minimum requirements

CPU

Intel Core 2 Duo at 2Ghz, or AMD Athlon 64 x2 2ghz, or better

1 Ghz Pentium III or AMD Athlon

RAM

2 GB

512 MB

Video Card

NVidia 8800GT with 512Mb RAM, ATI 3850HD with 512Mb RAM, or better

GeForce 2 or equivalent

HDD

3 GB

400 MB

6. Tremulous

Tremulous

Tremulous is a free and open source game that incorporates a team-based FPS game with real-time strategy elements. The game developed by Dark Legion Development, released on August 11, 2005 and is based on the ioquake2 game engine. Although it originated as a mod for Quake 3, but ultimately went standalone.

Tremulous won the Mod Database “Mod of the Year” 2006 competition under the category of “Player’s Choice Standalone Game of the year”, and also came in first in a “Best free game based on GPL Quake source?” poll on the Planet Quake website.

Gameplay: The game is presumably set in the future, where humans fight against spider-like aliens. Players can choose from 2 unique races, aliens and humans, and each of the team players can build working structures during the game like a Real Time Strategy game. The most significant structure is ‘spawn’, which provides each team with supplements to replace players who have been killed.

System Requirements:

Recommended Requirements

Minimum requirements

CPU

Pentium 4  3.46GHz or Athlon 64 3800+

Pentium 4 1.8GHz or Athlon XP 1700+

RAM

2 GB

256 MB

Video Card

Nvidia GeForce GT 120 , AMD Radeon HD 4550

Nvidia GeForce 210 , AMD Radeon X600 Series

DirectX version

DX 9.0c

DX 9.0c

HDD space

4 GB

125 MB

7. Warsow

warsow

Warsow  is a First Person Shooter (FPS) video game designed for online play, inspired by the fast paced shooters of the late 1990’s and early millennium. Warsow’s codebase is free and open source software, distributed under the terms of General Public License, and is built upon Qfusion, an advanced modification of the Quake II engine. Warsow stands out as a unique experience as its development team has strived to create a fun, fast, and action-packed game focused on speed, trickjumps, art of movement. This title uses cell-shaded graphics in a cartoon-ish style to fuse themes including cyberpunk, industrial, and sci-fi.

Gameplay: This fast-paced 3D ego-shooter focuses heavily on movement and trickjumps, where many of the tricks originate from the Quake series, including circle-jumping, bunny hopping, strafe-jumping, double jumping, ramp-sliding, and rocket jumping. Apart from these tricks, Warsow also allows the players to dash, dodge or wall jump, which were originally possible in the Urban Terror.

System Requirements:

Minimum Requirements

CPU

Pentium II 300 Mhz or greater

RAM

64 MB

Video Card

16 MB (Riva TNT or better)

HDD

400 MB

Note – The recommended requirements for this game weren’t directly available. This is what we got from some discussion forums:

CPU – Intel Pentium 4 (3.00 GHz)
RAM – 512 MB
Video Card – 256 MB  (nVidia GeForce 5500 FX)
HDD  – 2 GB

8. Open Arena (OA)

open arena

Open Arena is an open-source multiplayer FPS game based on the ioquake3 fork of the id tech 3 engine. It is developed by the OpenArena Team and released under the GNU General Public License V2.0 (GPLv2). The game’s official site includes downloads for GNU/Linux, Microsoft Windows and Mac OS X Operating systems and is also available from the default repositories of Linux distributions, like Debian, Gentoo, Fedora, Arch, Mandriva, and Ubuntu. OpenArena can be played freely, offline or online, and users are also able to run their own LAN or internet server.

Gameplay: OpenArena’s gameplay is precisely same as Quake III Arena: Win the game by scoring frags with the help of a balanced set of weapons designed for different situations. Every match happens in an “arena”, a map where players try to kill each other; arenas are designed for gametypes such as deathmatch, Tournament, Team Deathmatch, and Capture the Flag. Due to violent and mature content, it’s unsuitable for children under the age of 17.

System Requirements:

Recommended Requirements

Minimum Requirements

CPU

Pentium III 700MHz / AMD Athlon XP 2800+

Pentium II 233MHz / AMD K6-2 300MHz or equally powerful processor

RAM

256 MB

64 MB

Video Card

Geforce 4 Ti 4400

16 MB (with OpenGL acceleration)

Free Disk Space

270 MB

50 MB

9. Freecol

Freecol

FreeCol is a free and open source turn-based strategy video game, which is imitation of the old game Colonization, and is similar to Civilization. The game was initially released on January 2, 2003, but its stable release came out 17 months ago, on January 7, 2013. It remains same in terms of mechanics and gameplay as the original game, but with newly added set of redesigned graphics.

Gameplay: The objective of the game is to colonize the New World. The game starts in 1492 with a vessel and some colonists, and the player builds up colonies in the New World, struggling for power with other colonies from rival Europeans. The expansion of colonies continues with help from the European king until no help is required from Europe, meaning that colonies can stand alone without any exterior help, and declares independence from the King. If the colonies are able to resist attacks of the King’s forces, then victory is obtained.

System Requirements:

Recommended Requirements

Minimum Requirements

CPU

Intel(R) Core(TM)2 Duo CPU P8700 2.53 GHz

Pentium 3  1GHz

RAM

512 MB

256 MB

Java Version

Java Runtime Environment 7

Java Runtime Environment 5 (or JRE 6)

Resolution

1024 X 768

1024 X 768

10. Extreme Tux Racer

Extreme_Tux_Racer

Extreme Tux Racer, originally named Tux Racer, is a free software 3D computer game which lets a player take on the role of the Linux mascot, Tux the penguin. The game was released on October 2, 2000 by Jasmin Patry, a student studying at the University of Waterloo in Ontario, Canada.  An original Linux game, it is a very fun and simple racing game, without any complexity or violence, which makes it suitable for all age groups.

Gameplay: In the game, Tux slides down various courses of steep, snow- and ice- covered mountains, to achieve the best time and the best score. The score can be increased by collecting herring while racing and sliding down the course. Sliding on snow allows more manoeuvrability, sliding on ice makes Tux go faster and sliding on rocky patches slows down Tux.

System Requirements:

Recommended Requirements

Minimum Requirements

CPU

400 MHz CPU or better

Pentium 200MMX

RAM

128 MB

64 MB

Video Card

TNT2/Voodoo3-class 3D graphics card or better

3D graphics card with full OpenGL support

Sound Card

16-bit

16-bit

HDD

20 MB

20 MB

 

Have something to say? Leave a comment below.

wattOS (R8) ditches Ubuntu in favor of Debian

Looking for an open source Linux distribution that can conserve more power (so that you can have, for example, a longer-lasting laptop battery) and run better on older hardware without compromising on features or performance that you’d expect from a full power system? wattOS could be the answer.

While other lightweight Linux distributions like Puppy Linux, are also energy-saving, as they consume fewer resources to run, what truly differentiates wattOS from them is that it also includes specific optimisations for power saving.

Release 8 specific information

Version 8.0 of the green distribution was released on May 11. As the release announcement notes, the 8.0 release (also known as R8) has switched from Ubuntu to the current stable branch of Debian 7.0, Wheezy (Linux Kernel 3.13.10-1). The latest release includes three flavors : wattOS Mate’ edition, LXDE edition, and the ultra-slim Microwatt edition. While the first two include 32- and 64-bit, the third flavor is 32-bit only.

As wattOS is targeted at low-level hardware, it largely includes lightweight applications which are not the most popular and sophisticated ones, but still can do their job.

Default applications include PCManFM file manager, Shotwell graphics editor, Iceweasel web browser (Qupzilla in case of Microwatt), Filezilla file transfer client, Transmission torrent client, ePDFViewer for PDF viewing, Audacious music player, VLC multimedia player, and more. You can also install the standard Debian packages via the Synaptic Package Manager.

As far as hardware and memory requirements are concerned, all three editions should be able to run on any system that has a Pentium 3 class processor or better. While LXDE and Mate require 192-256MB of RAM to install but less than 128MB after install is complete, the Microwatt edition, which now runs openbox instead of PekWM, should be able to run with a comparatively smaller memory footprint.

History

wattOS is developed and maintained by a Portland-based technology consultant Biff Baxter, real name Ronald Ropp. The idea behind the OS, which was first released in July 2008, was to create a simple, minimal, and fast desktop that can leverage the large Debian/Ubuntu knowledge base and repositories.

Aside from individual users, a Thailand-based company NorhTec that makes the Gecko EduBook, a low power, portable and cost-effective laptop, is using a custom version of wattOS.

A quick review

NOTE – I’ve used the Microwatt edition for this review.

After I downloaded the wattOS ISO from its official website, what grabbed my attention first up was its size, which has increased from 456MB to 650MB in case of Microwatt edition. Although I successfully did a test run of the OS through a live USB, I still decided to install it.

As far as installation is concerned, the process was quick (took around 5-7 minutes), but could be a bit difficult for newbies because unlike some of the popular Linux distros like Ubuntu, that automatically partition your disk during installation, wattOS installer requires you to do manual partitions (using gparted) of your hard drive.

On the positive side, the booting time is really quick. From the moment of selection of boot option in the Grub menu until the moment when I got a login prompt, I only had 16 seconds of waiting time. The desktop, which appears almost instantaneously as you type the password and hit Enter, contains nothing except for dynamic system information and shortcut keys to launch various apps and services. A right-click on the desktop, however, produces a list of app categories each containing one or more apps. Turns out this is the only way to browse the system graphically.

NOTE: A quick look at the R8 specific pictures here reveals that the desktop experience varies from edition to edition.

A freshly booted wattOS system took about 105 Mb of memory, which is quite decent. Talking of software, I am quite used to working on Google Docs, but when I used QupZilla web browser to edit a document stored on Google’s cloud storage service, I got a warning that some fonts couldn’t be loaded correctly, suggesting me to upgrade the browser.

What more, the browser didn’t display tab icons for various websites (like Google, Gmail, LWN, and more), which makes it harder for you to identify the website while switching tabs. Privacy focused search engine DuckDuckGo is the default, but you can also opt for Google powered search in the search bar.

While working on command line, I observed that you cannot paste any text copied from another application, say a text file or a web page. I tried Ctrl+v, Ctrl+Shift+v, right-click->paste, but nothing happened. To clarify, a right click doesn’t produce any option, let alone paste, when done on command line shell.

Another strange problem that I observed was related to the root account. I was able to switch to root account using ‘su -‘, but wasn’t able to change the password. The passwd command kept throwing:

“passwd : authentication token manipulation error”.

After googling around for sometime, I found that others are also facing similar problems.

Also, there is no pre-installed email client. That’s weird because not everybody out there is using web-based email clients. Anyway, you can always install an email client (or any other software) from the repos though, and while WattOS prefers lightweight software, you’re obviously not restricted to it. A good thing about WattOS being tied to Debian, one of the big distributions, is that there’s less of a chance of being stuck for an application that you need.

Conclusion

wattOS is not a perfect Linux distro, as it has quite a few quirks that may annoy some users, but the good thing is that it delivers what it is supposed to — a lightweight, fast, and energy-efficient Linux experience. If you are looking for a Linux distro for your old desktop, try wattOS.

5 Ways To Check If Linux OS is 32 bit or 64 Bit

Sometimes Linux newbies get confused while downloading a software because the download page offers them both 32 bit and 64 bit versions of the same software. It is important to know whether your Linux OS is 32-bit or 64-bit, as this information is required while doing various tasks. In this article, we will discuss five different ways to check if your Linux OS is 32-bit or 64-Bit.

Check If Linux is 32-bit or 64-Bit

Please note that the methods mentioned in this article are tested on Ubuntu 13.10.

1. Execute the ‘uname -a’ command

One of the most common way to check if your Linux OS is 32 bit or 64 Bit is by running the uname command.

For example, on my system, it displayed the following information:

$ uname -a
 Linux ubuntu 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013 i686 athlon i686 GNU/Linux

The highlighted i686 (or i386 in some cases) signifies that the operating system is 32 bit, but if x86_64 appears, then it means that the OS is 64 bit.

2. Execute the ‘uname -m’ command

A similar but slightly different way is to run the ‘uname -m’ command.

For example, on my system, it displayed the following information:

$ uname -m
 i686

Which means that my Ubuntu Linux is 32-bit. If it would have been 64 bit, the output would have been x86_64.

3. Using the file command

Although it’s a kind of hack, but still it can be used to solve the purpose. In this case, you have run the file command with /sbin/init as an argument.

Here is an example :

$ file /sbin/init
 /sbin/init: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xc0d86a25a7abb14cad4a65a1f7d03605bcbd41f6, stripped

The highlighted 32-bit signifies a 32-bit OS, and vice-versa.

4. Using the arch command

Another alternative is to use the arch command, which prints the machine hardware name.

Here is an example:

$ arch
 i686

So you can see that the output was i686, which signifies a 32-bit OS. For a 64-bit OS, the output would have been x86_64.

5. Through system settings

If you are using Ubuntu 12.04 or higher, you can easily check your OS architecture by going to All Settings -> Details.

details

So you can see that the OS type (32-bit) is clearly mentioned here.

Do you know other ways to check if Linux OS is 32 bit or 64 Bit? Share your ideas in comments

tailf : Follows The Growth Of A Log File, Better Than ‘tail -f’

Do you use Linux on your laptop? Do you use ‘tail -f’ command frequently? If the answer to both these questions is YES, there is a better solution in form of Linux tailf command. It works same as ‘tail -f’ but is better than it in terms of saving battery life of your laptop. In this article, we will quickly learn some aspects of this command.
Continue reading

MegaCmd – A Command Line Utility To Access Kim Dotcom’s Mega Cloud Storage

For all those Linux command line freaks, who want to access Kim Dotcom’s Megaupload replacement http://mega.co.nz through command line, here is a good news. I recently stumbled upon an open source command line client Megacmd, developed specifically for the same purpose. In this article, I will discuss how to download, install, configure and use this command line client.
Continue reading

dtrx – A Versatile Tool To Easily Extract tar, zip, cpio, rpm, deb, gem, 7z, cab, rar, and InstallShield Archives

If you are an experienced Linux user, you would have definitely dealt with various archive formats. For example, tar, zip, rpm, deb, 7z, and more. Extracting these archives requires either different commands, or different command line arguments in case the command is same. Well, if you always wanted a single command that could extract most of the commonly used archive formats without any complexity, your search ends here. In this article, we will discuss dtrx command, which can extract all the popular archive formats.
Continue reading

lsblk – Command To Display Block Device Information In Linux

Have you ever dealt with block devices in Linux? Well, it is unlikely if you are not a file system pro, but as a system admin you should know some basic commands that can help you debug a file system-related problem in Linux. In this article, we will discuss the lsblk command, which displays block device related information in Linux.

NOTE – To know basics of block devices in Linux, read this tutorial.

lsblk Command in Linux

Here is a snapshot of the description of lsblk command from its man page :

lsblk-main

Testing Environment

  • OS – Ubuntu 13.04
  • Shell – Bash 4.2.45
  • Application – lsblk 2.20.1-5.1ubuntu8

A Brief Tutorial

Lets understand its usage through some practical examples.

1. List block devices

To list block devices using this command, just run it without any option :

$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0    50G  0 part 
├─sda2   8:2    0    20G  0 part 
├─sda3   8:3    0 132.9G  0 part 
├─sda4   8:4    0     1K  0 part 
├─sda5   8:5    0   1.3G  0 part [SWAP]
└─sda6   8:6    0  28.7G  0 part /
sr0     11:0    1  1024M  0 rom

So you can see that a lot of information related to block devices is displayed in the output.

If it is required to display information corresponding to all the devices, use the -a option.

Here is an example :

$ lsblk -a
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0    50G  0 part 
├─sda2   8:2    0    20G  0 part 
├─sda3   8:3    0 132.9G  0 part 
├─sda4   8:4    0     1K  0 part 
├─sda5   8:5    0   1.3G  0 part [SWAP]
└─sda6   8:6    0  28.7G  0 part /
sr0     11:0    1  1024M  0 rom  
ram0     1:0    0    64M  0 disk 
ram1     1:1    0    64M  0 disk 
ram2     1:2    0    64M  0 disk 
ram3     1:3    0    64M  0 disk 
ram4     1:4    0    64M  0 disk 
ram5     1:5    0    64M  0 disk 
ram6     1:6    0    64M  0 disk 
ram7     1:7    0    64M  0 disk 
ram8     1:8    0    64M  0 disk 
ram9     1:9    0    64M  0 disk 
loop0    7:0    0         0 loop 
loop1    7:1    0         0 loop 
loop2    7:2    0         0 loop 
loop3    7:3    0         0 loop 
loop4    7:4    0         0 loop 
loop5    7:5    0         0 loop 
loop6    7:6    0         0 loop 
loop7    7:7    0         0 loop 
ram10    1:10   0    64M  0 disk 
ram11    1:11   0    64M  0 disk 
ram12    1:12   0    64M  0 disk 
ram13    1:13   0    64M  0 disk 
ram14    1:14   0    64M  0 disk 
ram15    1:15   0    64M  0 disk

So you can see that the information related to all the block devices is displayed in output.

2. Print the SIZE column in bytes

Use the -b option to achieve this :

$ lsblk -b
NAME   MAJ:MIN RM         SIZE RO TYPE MOUNTPOINT
sda      8:0    0 250059350016  0 disk 
├─sda1   8:1    0  53686370304  0 part 
├─sda2   8:2    0  21476206080  0 part 
├─sda3   8:3    0 142683932160  0 part 
├─sda4   8:4    0         1024  0 part 
├─sda5   8:5    0   1372585984  0 part [SWAP]
└─sda6   8:6    0  30836523008  0 part /
sr0     11:0    1   1073741312  0 rom

So you can see that the SIZE column displays values in bytes.

3. Hide the information related to slaves

In the last example, observe that information related to sda and its slaves was displayed in the output. If you do not want to display slave related information, use the -d option.

$ lsblk -d
NAME MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda    8:0    0 232.9G  0 disk 
sr0   11:0    1  1024M  0 rom

So you can see that the information related to slaves is not displayed in the output.

4. Output information about the owner, group and mode

To display information related to the owner, group and mode of the block device, use the -m option.

$ lsblk -m
NAME     SIZE OWNER GROUP MODE
sda    232.9G root  disk  brw-rw----
├─sda1    50G root  disk  brw-rw----
├─sda2    20G root  disk  brw-rw----
├─sda3 132.9G root  disk  brw-rw----
├─sda4     1K root  disk  brw-rw----
├─sda5   1.3G root  disk  brw-rw----
└─sda6  28.7G root  disk  brw-rw----
sr0     1024M root  cdrom brw-rw----

5. Use key=value output format

This can be achieved by using -P options.

Here is an example :

$ lsblk -P
NAME="sda" MAJ:MIN="8:0" RM="0" SIZE="232.9G" RO="0" TYPE="disk" MOUNTPOINT=""
NAME="sda1" MAJ:MIN="8:1" RM="0" SIZE="50G" RO="0" TYPE="part" MOUNTPOINT=""
NAME="sda2" MAJ:MIN="8:2" RM="0" SIZE="20G" RO="0" TYPE="part" MOUNTPOINT=""
NAME="sda3" MAJ:MIN="8:3" RM="0" SIZE="132.9G" RO="0" TYPE="part" MOUNTPOINT=""
NAME="sda4" MAJ:MIN="8:4" RM="0" SIZE="1K" RO="0" TYPE="part" MOUNTPOINT=""
NAME="sda5" MAJ:MIN="8:5" RM="0" SIZE="1.3G" RO="0" TYPE="part" MOUNTPOINT="[SWAP]"
NAME="sda6" MAJ:MIN="8:6" RM="0" SIZE="28.7G" RO="0" TYPE="part" MOUNTPOINT="/"
NAME="sr0" MAJ:MIN="11:0" RM="1" SIZE="1024M" RO="0" TYPE="rom" MOUNTPOINT=""

So you can see that the output is displayed in a key=value format.

This command provides a lot of other options, read this man page for more options.

Download/Install/Configure

Here are some of the important links related to the lsblk command :

  • Home Page [Let me know if you find home page of this utility]
  • Download Link

The lsblk command comes as a part of util-linux package which is pre-installed in most of the Linux distributions.

Pros

  • Pre-installed in most Linux distributions
  • Provides lots of options

Cons

  • Some options require good knowledge of block devices in Linux

Conclusion

lsblk is a good utility for fetching information related to block devices. Though it is not for normal users but a handy tool for system administrators and Linux pros. Keep it in your tool set, it’ll definitely help you some day.

Have you ever used lsblk command or any other similar command line utility? Share your experience with us.

look : Linux Command To Verify Spellings And Display Lines Beginning With A String

Have you ever felt the need of a command line utility in Linux through which you can verify spellings? A utility that can display lines in file which contain a particular string as a prefix? Well, in this article we will discuss the look command in Linux that is capable of doing both these tasks.

Continue reading

Quick Open : A Gedit Plugin That Lets You Quickly Open Files

Gedit is one of my favourite GUI-based text editor in Linux, I really like its simple UI. But, I always felt the need of a better alternative or rather quicker alternative to open files especially when it is required to be done frequently. This was the situation until I stumbled upon Quick Open, a gedit plugin that lets you quickly open files. In this article, we will understand the way it works.
Continue reading

Plank : A Simple And Lightweight Dock For Lean Desktops

In one of our earlier article, we covered Cairo-Dock — a MAC OS X style desktop interface that provides a graphic rich dock for launching applications. But, the fact is that not everybody wants animation-rick dock, especially if you are working on lean desktops like XFCE. In this article, we will discuss Plank — a simple dock with minimalistic look and feel.
Continue reading