Yet Another Post About the Unix Philosophy

| Comments


I have a recently started a minor Linux Users Group with some people in my locality. One question that I’ve been answering frequently is ‘what is this “unix philosophy”?
Am writing this post as a quick answer for this question.

Some history of the unix philosophy

Unix philosophy or the unix tools philosophy emerged when the UNIX operating system was created. Or to be more precise, when the pipes ‘|’ were invented. The pipes allow output from one command to be sent to another command as input.
e.g
ps -A | grep firefox
The output from the ps command, list of all running applications is passed to the ‘grep’ utility which searches for the line having the word ‘firefox’, and prints it. Pipes are really handy. Really.

The philosophy lead by this invention was to create small tools which would do a particular job  instead of creating big programs that do many things.
For example tools like grep, or wc. They exist for one and only one task (searching and counting).

These small tools could then be used together with the help of pipes to accomplish more complex tasks.

It was revolutionary. This philosophy avoided programmers from re-creating small subsystems of their software which could now be replaced by a small tool invented by someone else.

So this why the philosophy says
‘Do one thing, and do it perfectly well’

/etc/passwd Illustrated

| Comments

etc/passwd file is is located, well, in /etc directory. /etc stores most of the system level configurations for a typical UNIX(-like) system. There are more than one ways to do something on a UNIX(-like) system. We’ll discuss about some commands no the way which can be used to do stuff we gonna do by tinkering with /etc/passwd in this post. So let’s talk less and discuss something about the /etc/passwd without loosing time.

 

Why do /etc/passwd exist?


So the first question that would come in a mortal mind is ‘what for?’. Why do /etc/passwd even exist? It saves the information about all the users on a system. Original use of this file was to store almost all the data related to a user, including passwords. May be that’s the reason behind its name. But don’t worry, passwords are no longer stored as plain text in this file. More on this in later sections.

 

FOSS in Android: Android App Store With All and Only FOSS Apps (F-droid)

| Comments

Android as Google claims is not a completely open platform. Mozilla has launched their own initiative to provide a completely open-source mobile platform with Firefox OS. I am looking forward for a switch form android when it launches in my place. But Android is not that bad. And for the open source lovers, there is a paradise yet unknown to many. There are a shit load of Android apps open-source and free. I found many of my friends unaware of them, so here I am writing this post. Google play is undoubtedly most prominent source of downloading android apps. Average android user seldom goes out to download apps despite the presence of some other quite trustworthy stores. But we are open source lovers right? And we want all open-source tools. So what do the Android world have to offer to us? It rarely happen on the Google Play store that some open source app make it to the featured list. They get lost in the crowd of all those ‘fancy’ apps.

How to Install Software in Linux Without Using Any Package Manager

| Comments

Package managers are awesome. As awesome as automatic software installation get you. Would it be apt, yum or pacman, they are all awesome for their systems. But sometimes we need to install binaries. Your package manager knows how to install a .deb or .rpm, but what about the stuff in that ./bin folder of the tar.bz2 bundle of latest version of your favorite software you just downloaded? No, it can’t be handled with the package manager.         

How to Setup Postgresql (Python-flask) App on Heroku and Local Machine

| Comments

So I was like setting up a python web app on Heroku cloud platform and it was awesome. You don’t need to break a sweat to deploy something like a ROR app but things are different when it come to micro-frameworks like Python-flask.
I chose flask for the beauty and simplicity, and because I wanted to do everything myself. The app has postgres-sql as it’s database backend. Deploying apps on Heroku is easy and all but there are some things which are not that easy to find in official docs and tutorials.
So here we shall proceed with setting up postgres (with Python) on Heroku.

Setting Up Your Own LAMP Machine for PHP Development -Setting MySql and PHP

| Comments

<< Previous: Setting up Apache

Well, after setting up the apache http daemon, it’s time for the database management system, the ‘M’ of LAMP.

Installing MySql

It can’t be easier. Just shoot the terminal and type:
sudo apt-get install mysql-server
Yup! That’s it. You’ll get some prompts and will be asked to enter the password for root user (root user of MySql not the Operating System). Just enter the details and that’s all for the MySql.

Removing Mysql from Startup

Yeah, just like Apache daemon, mysql put itself on startup too. And it will not get removed by just running update-rc.d. We need to comment out a couple lines in the mysql.conf file. So, shoot the terminal and do this.

Setting Up Your Own Home LAMP Machine for PHP Development -Setting Apache

| Comments

Hello there!!
Well am back here after a long time. Writing blog posts is really boring when you have something as awesome as writing code, and writing code for web applications is what is red hot in the skies right now. So here’s this post to help us setting up our own LAMP (Linux - which all of us already have, Apache - the HTTP server, MySql - the Database Management System, and PHP - the sexy thing we’ll write our web apps in). 
Php Development in Linux
Yea I know it is dead easy to just use the LAMP (like people use WAMP on Windows), but what’s the meaning of using something as awesome as Linux if we are gonna use those tools(no offenses here). I hate using LAMP anyways.
So what we gonna do is installing Apache, Mysql and PHP on our machine and setting it up for awesome developing PHP apps.

Using Backtrack 5 R1 as Desktop Operating System: BT for Beginners

| Comments

Backtrack is one of the most famous penetration testing Linux distros. It is derived from Linux 10.04, but it is not as easy as Ubuntu to use for a rookie Linux user. BT5 R1 has made it a lot easier to use it as a Desktop OS, but here is how I tuned my machine this time.

Adding Unprivileged user

Default user in BT is root, since it is made for penetration testers and root privileges are needed for running almost all the tools. But, we are using it as a Desktop OS and for general usage, super user privileges are dangerous. So we’ll add a normal user (like a default user in Ubuntu and Mint). BT5 R1 has made this job a lot easier. We must need to issue a single command:
adduser username
where username is name of user we want to add.
In previous versions of BT, we have to install adduser program using “apt-get install adduser”.

Finetune Ui With Mouse Gestures

| Comments

— layout: post title: “FineTune UI with Mouse Gestures: An alternative to Keyboard Shortcuts” date: 2011-08-31 comments: true categories: [‘GNU/Linux’] —
I usually don’t like writing tutorials about particular software which themselves are easy to use and self explaining, but this one is special. This post is dedicated to “Easystroke”, a gesture recognition program and a few more tiny-winy tweaks.
I don’t make a very innovative use of mouse and often use key-board shortcuts along with mouse to get work done fast and smoothly.
But, fortunately, day before yesterday I got my left hand hurt when I was working in farm. Due to injury I was unable to use keyboard and mouse at same time, so I started searching for an alternative to keyboard shortcuts.
Out of few solutions I came along with, most successful was Eastystroke. It quickly get integrated with  the user interface and is helping in fast recovery of my hand : )
So we shall start with our journey to tune up the UI as per our needs.

Download in Geek Style: Use Wget (Part 2)

| Comments

Hello there ! !
After our last article on Introduction to wget for Linux newbies, it is time to advance a little further. In this article  we’ll discuss advanced usage of Wget.
Let’s start with Wget’s most wanted command:


Downloading Recursively (-r switch)

Wget can download recursively, following all the links it meet in the way of downloading process. For example, you are reading an online book (ebook of course), which has links to further chapters. Using this command you can easily download all the pages of the ebook with a single command making your own copy of the ebook to be read offline. Even better, doing some Google we can download as many mp3s or other files as we want, all in a single command.
Excited ? (I know you are)
All right, enough talking.