Sharing tutorials about *nix

Using Git

Filed under


Git is a version control system widely used by many. In this tutorial, we guide you through using Git for your own programming projects.

Firstly, what exactly is Git?

Git is a version control system created by Linus Torvalds, the creator of Linux as well (which is the operating system you're most likely using right now, as you should know). However, what exactly is a version control system?

Version control systems help programmers manage changes to their code. It helps to streamline development, enable development with other developers and contributers, allow a commit to be reverted easily etc.

Why Git?

I interviewed a couple of people on IRC.

Here's the first interview with clem, the project leader of Linux Mint.

<wei2912> clem, why do you find git awesome? :)
<clem> I use git to detect changes... I git init my ~, click buttons... and I see what the tools changed :)
<clem> I use git to take notes... so I don't need to write down the changes I made myself
<clem> I use git to go back to previous versions of my work, so if I make a mistake, it's no big deal
<clem> I use git to exchange and work with others... etc etc..
<clem> there's a lot of common use cases for not only devs but users in general
<clem> that's why I need version control systems...
<clem> now why git in particular?
<clem> first, it's standard, everybody uses git
<clem> it's the most popular toy right now
<clem> second it comes with awesome web tools like github and all
<clem> third it's decentralized.. which means you can bring it home, on your USB key, work offline, branches and forks are as important as each others and it's just brilliant to exchange stuff
<clem> everybody's work is compatible
<clem> two forks can merge together without needing anything from the original branch
* wei2912 agrees strongly about taking notes, reverting, everybody using it, decentralization and ease of merging :D
<clem> two co workers could actually meet in a cafe, offline from the Internet, merge their respective work they did at home, end up with a version they like and bring it to the office together to merge with the rest of the team, in which some of the guys would have changed stuff at home too...
<clem> it's completely brilliant :)
<wei2912> yeh
<wei2912> IMO linus did do a great job :)
<clem> it's kinda like having all the pros of the version control without the cons
* clem remembers clearcase...
<clem> central clearcase servers hosted in sweden... encrypted HDDs... what a nightmear that was :)
<wei2912> there's another important reason as well
<wei2912> it's free of charge and open source
<clem> yes

And the second interview with Subsentient, the guy who own the server which this site is hosted on:

<Subsentient> wei2912: It seems to be the most mature and stable version control system around. In a relatively short time it's become unrivaled in stability, usability, and reliability.
<wei2912> true

And my own personal view...

Git provides an easy way to manage a project. It is powerful yet simple and can (have) been used to do loads of stuff. Git can be used for a variety of things; GitHub recently launched, allowing governments to have a platform to collaborate on policies.

Git is free and open source. Anyone can use it free of charge, free of restrictions. Git is also decentralized. What does decentralization mean? Simply put, rather than a large repository which everyone updates, everyone has their own version of the repository. As clem said, two coworkers could meet in a cafe, merge their work at home and bring it to the office to merge with the office repository. They don't need any Internet connection to do this and the best part is, other workers can do so as well at the same time.

Read more at Using Git.

Hashcat Basics

Filed under


Hashcat is a nifty tool for testing out passwords. In this tutorial, we'll give you a guide through the basics of Hashcat.

Before we start, I'd like to warn you that attempting to break into any system is illegal. The content provided is meant only for educational purposes.

Hashcat is a tool often used to test out passwords. Firstly, I'll explain how passwords are stored in a typical Linux system, then show how Hashcat is different from other password crackers.

Downloading Hashcat

Let's obtain a copy of Hashcat first. In this tutorial, we'll be using the standard hashcat.

Hashcat uses .7z extraction, so to extract it:

$ 7z x file.7z

Once it's extracted, cd into the directory. That's the end of the installation!

Testing out Hashcat

Let's see if Hashcat works.

Once you're inside the Hashcat directory, execute the following command:

$ ./hashcat-cli64.bin -m 0 examples/A0.M0.hash examples/A0.M0.word

If using 32 bit:

$ ./hashcat-cli32.bin -m 0 examples/A0.M0.hash examples/A0.M0.word

You'll see a huge jumble of text pop up. The bottom part is what matters:

Input.Mode: Dict (examples/A0.M0.word)
Index.....: 1/1 (segment), 102 (words), 2769 (bytes)
Recovered.: 102/102 hashes, 1/1 salts
Speed/sec.: - plains, - words
Progress..: 102/102 (100.00%)
Running...: --:--:--:--
Estimated.: --:--:--:--

As seen here, we've successfully cracked all hashes. But how did we do it? Let's delve in further.

Read more at Hashcat Basics.

Ncurses Tutorial

Filed under


Have you ever wanted to make a console application or game in C++? Well, Ncurses is the solution! This short tutorial will teach you how to setup this library on CodeBlocks and will teach you some basic features.

This tutorial will consist of 2 parts:

1) Installing Ncurses on CodeBlocks

2) Showing some basic features

After this tutorial, you will be able to create your own console application using Ncurses.

Read more at Ncurses Tutorial.

Using chmod and chown

Filed under


Learn how to master the two commands that are often associated with file permissions manipulation - chmod and chown.

This was originally a class at, so feel free to visit it if you want to experience something more interactive.


So, what's chmod?

Looking at the manpage of chmod, as quoted:

chmod - change file mode bits

These "file modes" will be covered later. In short, it lets you change the file permissions. You can change a file permission only if you match any of these criteria:

  1. You are the owner of the file.

  2. You are the root user.

  3. You are already given permission to modify file permissions by the owner or a root user.

Read more at Using chmod and chown.

Mobile Development

Filed under


Get started on developing from your tablet, using nothing more then a Tablet (Asus TF700T Transformer).

I (diabolist) bought a Transformer Tablet and its keyboard attachment, as a cool product and hopefully a nice tool. The idea is to be able to development, modify, even test code in a mobile environment. It is far from perfect, but with patience you can get tools needed to begin development.

First off... I rooted my tablet. You don't need to, but I find it necessary for some tasks. However, this is NOT needed for the setup that I have. There are not many apps that have the flexibility or give you back the power of your terminal like Terminal IDE. You can install this app through Google's Play Store. Terminal IDE uses Busybox, bash (bourne again shell), ssh, a few Java development tools, editors (nano, vim), even git (a little tricky to setup, but works), and you don't have to be root to use them.

Read more at Mobile Development.