Author Archive for Alan Haggai Alavi


Newbie’s introduction to GNU/Linux

First of all, I am happy that you have chosen to get `freed’ from the closed-source world. Welcome to this new world which lives on and around it’s friendly community. Let me give you a short introduction before we move on to the real transition:

“What makes GNU/Linux (yes, the operating system is named: GNU/Linux and it is the kernel that is named Linux) interesting and a strong operating system?”
It is due to it’s adherence to the Free Software Philosophy. Most software available (and there are many many to choose from!) come along with the source. Source is good in a way that it can be compiled in your own system so that it will make use of your hardware’s capabilities to the best. Also, you are able to edit, modify and use the way you want the software to run for you. This gets you the best software as all software is made for and by people like you and me. Bugs are reported and always solved as fast they can be.

“Why is the operating system named: GNU/Linux and not Linux as I used to think?”
Linux is the kernel. For an operating system, the kernel is the most important aspect or core of the system. It abstracts the hardware aspects from the software and offers an interface for software so that it can deal with the hardware more easily and can be (mostly) generally coded without knowing the clients’ hardware. Having just the kernel is not so useful. Furthermore, to be called an operating system, the system should have essential utilities and applications. We need software that uses the kernel. GNU (GNU is Not Unix) provides many many range of software for this kernel. Thus, the correct name for the operating system is GNU/Linux.

“I searched with the query `GNU/Linux’ and it came up with some pages giving me links to distributions. What are `distributions’?”
Distributions (or `distro’, as they are called in the community) can be thought of flavors like just we think about ice-creams. We have chocolate, vanilla, strawberry and other flavors for ice-creams. Such is the case with GNU/Linux. There are many distributions. They are obviously based on the Linux kernel. So, what makes them different? There are many or at least some differences among different distributions. For example, distributions differ according to philosophy, package management, directory differences, support, commercial or free, release dates, software used, etc.

“Why do we need so many distributions? Why is there no `standard’ distribution?”
With GNU/Linux comes the freedom of choice. One person’s interest may not be of interest to another person. So you are able to choose from the three hundred or so distributions which suits you the best.

“What is package management?”
Package management, as the name suggests, allows for the management of software packages. They provide an easy way to install, update or remove packages. They also automatically resolve dependencies, thus relieving the user from manually installing the software.

I will write more soon… Do comment.


Linux Directory Structure

The directory structure of Linux/other Unix-like systems is very intimidating for the new user, especially if he/she is migrating from Windows. In Windows, almost all programs install their files (all files) in the directory named: `Program Files.’ Such is not the case in Linux. The directory system categorises all installed files. All configuration files are in /etc, all binary files are in /bin or /usr/bin or /usr/local/bin. Here is the entire directory structure along with what they contain:

/ – Root directory that forms the base of the file system. All files and directories are logically contained inside the root directory regardless of their physical locations.

/bin – Contains the executable programs that are part of the Linux operating system. Many Linux commands, such as cat, cp, ls, more, and tar, are locate in /bin

/boot – Contains the Linux kernel and other files needed by LILO and GRUB boot managers.

/dev – Contains all device files. Linux treats each device as a special file. All such files are located in /dev.

/etc – Contains most system configuration files and the initialisation scripts in /etc/rc.d subdirectory.

/home – Home directory is the parent to the home directories of users.

/lib – Contains library files, including loadable driver modules needed to boot the system.

/lost+found – Directory for lost files. Every disk partition has a lost+found directory.

/media – Directory for mounting files systems on removable media like CD-ROM drives, floppy disks, and Zip drives.

/mnt – A directory for temporarily mounted filesystems.

/opt – Optional software packages copy/install files here.

/proc – A special directory in a virtual filesystem. It contains the information about various aspects of a Linux system.

/root – Home directory of the root user.

/sbin – Contains administrative binary files. Commands such as mount, shutdown, umount, reside here.

/srv – Contains data for services (HTTP, FTP, etc.) offered by the system.

/sys – A special directory that contains information about the devices, as seen by the Linux kernel.

/tmp – Temporary directory which can be used as a scratch directory (storage for temporary files). The contents of this directory are cleared each time the system boots.

/usr – Contains subdirectories for many programs such as the X Window System.

/usr/bin – Contains executable files for many Linux commands. It is not part of the core Linux operating system.

/usr/include – Contains header files for C and C++ programming languages

/usr/lib – Contains libraries for C and C++ programming languages.

/usr/local – Contains local files. It has a similar directories as /usr contains.

/usr/sbin – Contains administrative commands.

/usr/share – Contains files that are shared, like, default configuration files, images, documentation, etc.

/usr/src – Contains the source code for the Linux kernel.

/var – Contains various system files such as log, mail directories, print spool, etc. which tend to change in numbers and size over time.

/var/cache – Storage area for cached data for applications.

/var/lib – Contains information relating to the current state of applications. Programs modify this when they run.

/var/lock – Contains lock files which are checked by applications so that a resource can be used by one application only.

/var/log – Contains log files for differenct applications.

/var/mail – Contains users’ emails.

/var/opt – Contains variable data for packages stored in /opt directory.

/var/run – Contains data describing the system since it was booted.

/var/spool – Contains data that is waiting for some kind of processing.

/var/tmp – Contains temporary files preserved between system reboots.


Substitute User

su stands for `substitute user’ and not `super user.’ (Thanks to slacker for pointing out the mistake).

su - preserves the current environment variables so that they are available for the user who has been switched to.

su -l provides a login shell.

su [USER] if USER is not specified, root is assumed by default

su -c allows to run a command as the specified user


Changing runlevel

Temporary (one time) change
init 5 to change to runlevel 5 or whatever runlevel you wish to change to

Permanent change
Edit /etc/inittab
Move on to the line:
id:5:initdefault: or a similar line and change to the required runlevel.


First post

I am just starting with the site. Hope everything goes well. 🙂


June 2018
« Dec    

Top Clicks

  • None


Blog Stats

  • 87,594 hits