01
07
2008
Command line, are you afraid ?
Posted by: Wael Nasreddine in Linux, tags: bash, malicious-commands, shellMost people I know, whom aren’t very used to linux yet, are afraid of the command line, they think it’s hard to learn and somehow useless but that is entirely false… The command line is very easy to learn, well at least the basics of it, but you should know that the shell is much more powerful than anything you have, or will, ever use…
In this small article I will try to show you all the basics on the command line, but first things first, let’s start with the directory layout:
- /bin: Contains binaries that are needed for the boot process or for working in single mode, this folder should always be within the root partition!
- /boot: Contains boot information, usually it’s where grub/lilo and kernel files ends up.
- /dev: Contains device nodes, like /dev/console, /dev/sda /dev/hda etc… It used to be populated by devfs but now udev take care of it, you will find many articles on both devfs/udev on Google
- /etc: Contains system-wide configuration files and login information.
- /home: Contains the home folders for all non-root users
- /lib: Contains libraries needed for booting and single mode, just like /bin but it also includes kernel modules, This must reside in root as well.
- /media: Contains folders where removable devices will be mounted, like USB flash key
- /mnt: Contains any misc partition you might have, and CD/DVD drives too
- /opt: Contains anything that doesn’t fit inside /usr, basically any binary released software or Non-GPL licensed software… Be Aware that a lot of distribution choose this folder for different purposes, like installing Gnome/KDE inside, IMHO it’s not good but I respect their decision.
- /proc: Contains information on all running process, and some misc files like /proc/cpuinfo which is a detailed information on the processor.
- /root: is the home directory for the user root.
- /sbin: Just like /bin but only binaries that can’t be used unless you are root.
- /sys: Contains information on the system and all the attached devices on all ports (USB, IDE, Parallel Port… etc.. ) populated by the kernel.
- /tmp: Contains temporary files, you want to download/check something just throw it here, it’ll be deleted then next time you boot. NOTE: this is false for some distributions, please check the distribution to see if it does clean it up on boot.
- /usr: Contains binaries, libraries and include files for all the installed applications.
- /var: Contains databases and data files.










July 1st, 2008 at 9:33 am - Edit
[...] Hytech Proffessionals - Programmer’s Heaven wrote an interesting post today onHere’s a quick excerpt Most people I know, whom aren’t very used to linux yet, are afraid of the command line, they think it’s hard to learn and somehow useless but that is entirely false… The command line is very easy to learn, well at least the basics of it, but you should know that the shell is much more powerful than anything you have, or will, ever use… In this small article I will try to show you all the basics on the command line, but first things first, let’s start with the directory layout: /bin: Conta [...]
July 1st, 2008 at 9:34 am - Edit
[...] Contains databases and data files. Pages: 1 2 3 [...]
July 3rd, 2008 at 3:00 am - Edit
[...] Command line, are you afraid ? [...]