Tutorials :: Terminal


User and group management in Linux
Aug. 4, 2014, 6 a.m. by Nitin Venkatesh

Let's look at a few commands for adding, modifying and deleting users and groups alike. The commands are similar - useradd,usermod,userdel and groupadd,groupmod,groupdel. Note: Although a lot can be achieved using these tools, only a few operations have been demonstrated in the post for the sake of brevity. Please refer to the man pages to know about them. User Management ...


Searching the haystack with grep
July 26, 2014, 6 a.m. by Nitin Venkatesh

Short Version Syntax: grep [options] pattern [file] -i: ignore case of pattern -v: reverse search -n: display line numbers of lines matching pattern -c: display total count of number of lines matching pattern -e: used to specify multiple patterns Long Version grep is used to search for a particular string or pattern within a file or any given input. For ...


Viewing text files on Linux - cat, head, tail, more and less
July 4, 2014, 6 a.m. by Nitin Venkatesh

A lot of times, we have the need to view text files on a Linux box, whether it be logs or scripts or what have you. This post is more like a cheat-sheet for me on using the cat, head, tail, more and less commands, but with examples and some screenshots. Short version head <filename>- View the top few lines ...


Mounting bin and iso files in Linux
Jan. 5, 2014, 12:01 a.m. by Nitin Venkatesh

If you've encountered a .bin file and were wondering how to mount it on a Linux box, the iat tool is the answer you've been waiting for. (It's been around for a long time, but hey! You only look for something if you need it and that's why I am writing this post now :P ) Converting from .bin to ...


Using Ubuntu as a Windows File Server
Dec. 8, 2013, 2:55 p.m. by Nathan Osman

Although there are a number of ways to provide networked storage for a set of machines running Ubuntu, these methods don't work very well as soon as you throw a Windows machine on the network. (Windows does provide support for NFS but you'll need Windows 8 Enterprise, so this isn't likely a practical option.) Luckily, Ubuntu provides an easy way ...


Reading EPUB files without an EPUB reader
Nov. 18, 2013, 12:17 p.m. by Nitin Venkatesh

If you're ever stuck on a computer that has no EPUB reader but you need to read one, you don't need to worry about downloading an EPUB reader. What you should realise is that EPUB is just compressed archive of HTML files. So uncompressing it, reveals it's contents and you can read them with any web-browser. Here's an example. I'll ...


Clean up Ubuntu
Oct. 28, 2013, 1:13 p.m. by Selwyn

Let's first get this out of the way: Ubuntu does not need a lot of maintenance, don't expect magical performance boosts after cleaning up. However you will notice a bit more speed and creating some hierarchy in all your documents and images won't be bad too. I would recommend to do this once a year. Now we got that out ...


Saving Bandwidth with apt-cacher-ng
Aug. 25, 2013, 1:10 p.m. by Nathan Osman

At my home, we have three computers - all of which are running Ubuntu 13.04. Every time new package updates are released, each computer must download the packages directly from a nearby mirror and install them. This might not be a problem if I had a really fast Internet connection and relatively few packages installed. However, I have a ton ...


Batch Resizing / Converting Images on Linux
July 15, 2013, 4:56 a.m. by Nitin Venkatesh

All it takes is one line to resize a directory full of images to your desired size if you have the ImageMagick tools package installed. convert is a tool that comes with that package. To install ImageMagick: (on Debian/Ubuntu based systems) nits@excalibur:$ sudo apt-get install imagemagick To only resize: nits@excalibur:$ find . -iname '*.jpg' -exec convert {} -resize 120x120 {} ...


vnStat - Bandwidth monitoring simplified
April 25, 2013, 10:31 a.m. by Nitin Venkatesh

Whether you run a server, have an expensive hosting package or simply use your desktop, it’s always good to know how much bandwidth you’ve used up – and vnStat is just the tool for that. vnStat is a console-based bandwidth logger that uses information from your /proc/ & /sys/ to maintain those logs in a nice li’l DB. It organizes ...


Invoking the bash shell with some simple parameters
Jan. 28, 2013, 9:44 a.m. by Nitin Venkatesh

Although most of you may know how to do this, it’s just a personal note for myself and for others who might get something out of it. Everyone knows the bash shell can be kickstarted with the bash command. These few switches make life a li’l more easier: 1. $ bash -r # creates a restricted bash shell where the ...


What shell am I currently on?
Jan. 28, 2013, 9:03 a.m. by Nitin Venkatesh

Although most of you may know how to do this, it’s just a personal note for myself and for others who might get something out of it. There are a few ways to do this, we will not be depending on environment variables to tell us what shell we are on, since it’s a variable that echoes anything that it’s ...


← Older