It is basic list of directories and some files in the Linux and explains which directory and some files use for which need.
|/||The root directory where the file system begins. In most cases the root directory only contains subdirectories.|
|/boot||This is where the Linux kernel and boot loader files are kept. The kernel is a file called vmlinuz.|
|/etc||The /etc directory contains the configuration files for the system. All of the files in /etc should be text files. Points of interest: |
|/bin, /usr/bin||These two directories contain most of the programs for the system. The /bin directory has the essential programs that the system requires to operate, while /usr/bin contains applications for the system's users.|
|/sbin, /usr/sbin||The sbin directories contain programs for system administration, mostly for use by the superuser.|
|/usr||The /usr directory contains a variety of things that support user applications. Some highlights: |
|/usr/local||/usr/local and its subdirectories are used for the installation of software and other files for use on the local machine. What this really means is that software that is not part of the official distribution (which usually goes in /usr/bin) goes here. |
When you find interesting programs to install on your system, they should be installed in one of the /usr/local directories. Most often, the directory of choice is /usr/local/bin.
|/var||The /var directory contains files that change as the system is running. This includes: |
|/lib||The shared libraries (similar to DLLs in that other operating system) are kept here.|
|/home||/home is where users keep their personal work. In general, this is the only place users are allowed to write files. This keeps things nice and clean :-)|
|/root||This is the superuser's home directory.|
|/tmp||/tmp is a directory in which programs can write their temporary files.|
|/dev||The /dev directory is a special directory, since it does not really contain files in the usual sense. Rather, it contains devices that are available to the system. In Linux (like Unix), devices are treated like files. You can read and write devices as though they were files. For example /dev/fd0 is the first floppy disk drive, /dev/sda (/dev/hda on older systems) is the first IDE hard drive. All the devices that the kernel understands are represented here.|
|/proc||The /proc directory is also special. This directory does not contain files. In fact, this directory does not really exist at all. It is entirely virtual. The /proc directory contains little peep holes into the kernel itself. There are a group of numbered entries in this directory that correspond to all the processes running on the system. In addition, there are a number of named entries that permit access to the current configuration of the system. Many of these entries can be viewed. Try viewing /proc/cpuinfo. This entry will tell you what the kernel thinks of your CPU.|
|/media,/mnt||Finally, we come to /media, a normal directory which is used in a special way. The /media directory is used for mount points for physical storage devices (like hard disk drives)|
The /mnt directory provides a convenient place for mounting these temporary devices (removable devices). You will often see the directories /mnt/floppy (for floppy)and /mnt/cdrom (for CD-R or RW). To see what devices and mount points are used, type mount.
# tar xvzf package-version.tar.gz (or tar xvjf package-version.tar.bz2)
# cd package-version (directory where package content uncompress)
# make install
me@linux: ~$ tar xvzf packname-version.tar.gz
tarcommand with the appropriate options (
xvzf) for unpacking the tarball. If you have a package with
tar.bz2extension instead, you must tell
tarthat this isn't a gcompressped tar archive. You do so by using the
joption instead of
z, like this:
me@linux: ~$ tar xvjf packname-version.tar.bz2
me@linux: ~$ ls
cd(change directory) into that newly created directory:
me@linux: ~$ cd packname-version
me@linux: ~/packname-version$ ./configure
configurescript, you don't actually compile anything yet.
configurejust checks your system and assigns values for system-dependent variables. These values are used for generating a
Makefilein turn is used for generating the actual binary.
configurescript, you'll see a bunch of weird messages scrolling on your screen. This is normal and you shouldn't worry about it. If
configurefinds an error, it complains about it and exits. However, if everything works like it should,
configuredoesn't complain about anything, exits, and shuts up.
configureexited without errors, it's time to move on to the next step.
me@linux: ~/packname-version$ make
Makefilefor building the program. Otherwise it doesn't know what to do. This is why it's so important to run the
configurescript successfully, or generate the
Makefilesome other way.
make, you'll see again a bunch of strange messages filling your screen. This is also perfectly normal and nothing you should worry about. This step may take some time, depending on how big the program is and how fast your computer is. At this point I usually lose my patience completely. Don't worry yar take a break with coffee.
makehas done its job. Now, the final step is to install the program.
sucommand. It'll ask you the root password and then you're ready for the final step!
me@linux: ~/packname-version$ su
root@linux: /home/me/packname-version# make install
me@linux: ~/packname-version$sudo make install
configurescript, the program was installed in the default place. In many cases it's /usr/local/bin. If /usr/local/bin (or whatever place your program was installed in) is already in your PATH, you can just run the program by typing its name.
su, you'd better get back your normal user privileges type
exitto become a normal user again as follow
root@linux: /home/me/packname-version# exit
makeit created all sorts of files that were needed during the build process but are useless now and are just taking up disk space. This is why you'll want to
me@linux: ~/packname-version$ make clean
Makefile. It's needed if you later decide to uninstall the program and want to do it as painlessly as possible!
root@linux: /home/me/packname-version# make uninstall
drwx rwx rwx = 111 111 111 -rw- rw- rw- = 110 110 110 -rwx --- --- = 111 000 000 - --- --- --- = 000 000 000
- or d= id directory or not
r = Read the file or Directory w = write the file or Directory x = Execute the file or Directory And it is easy to: rwx = 111 in binary = 7 rw- = 110 in binary = 6 r-x = 101 in binary = 5 r-- = 100 in binary = 4 --- = 000 in binary = 0 example:
|777||(rwxrwxrwx) No restrictions on permissions. Anybody may do anything. Generally |
not a desirable setting.
|755||(rwxr-xr-x) The file's owner may read, write, and execute the file. All others |
may read and execute the file. This setting is common for programs
that are used by all users.
|700||(rwx------) The file's owner may read, write, and execute the file. Nobody |
else has any rights. This setting is useful for programs that only
the owner may use and must be kept private from others.
|666||(rw-rw-rw-) All users may read and write the file.|
|644||(rw-r--r--) The owner may read and write a file, while all others may only |
read the file. A common setting for data files that everybody may
read, but only the owner may change.
|600||(rw-------) The owner may read and write a file. All others have no rights. A |
common setting for data files that the owner wants to keep
|777||(rwxrwxrwx) No restrictions on permissions. Anybody may list files, create new |
files in the directory and delete files in the directory.
Generally not a good setting.
|755||(rwxr-xr-x) The directory owner has full access. All others may list the |
directory, but cannot create files nor delete them. This setting
is common for directories that you wish to share with other users.
|700||(rwx------) The directory owner has full access. Nobody else has any rights. |
This setting is useful for directories that only the owner may use
and must be kept private from others.