Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Monday, February 04, 2008

linux: Linux directory structure

Below is a typical linux directory structure of interest to me :

/etc - contains the configuration files for the system. /etc/rc.d contains the scripts that get the system started.

/bin - has the essential programs that the system requires to operate.

/usr/bin - contains applications for the system's users.

/sbin, /usr/sbin - contain programs for system administration, mostly for use by the superuser.

/usr/local - 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. 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.

/tmp - is a directory in which programs can write their temporary files.



Source: http://www.linuxcommand.org/lts0040.php

Sunday, January 06, 2008

linux: bootloader file location

I have an ASUS F3SV laptop. It's dual boot Vista / Ubuntu. In the boot menu, if I choose the first Vista menu option, the boot loader will be corrupted, making me unable to start up Ubuntu and Vista.

I have no problems getting if into Vista if I choose the 2nd Vista menu option. So, to prevent me from choosing the first Vista option in the first place, I simply commented that option in

/boot/grub/menu.lst

java/linux: Setup ClassPath in Unix/Linux (ubuntu) on your .bashrc

If you want to be able to call eclipse / ant / java from any prompt in your linux system, then
edit your .bashrc and add this lines :

# User specific environment and startup programs
export ECLIPSE_HOME=/usr/local/eclipse
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export ANT_HOME=/usr/share/ant

PATH=$PATH:$ECLIPSE_HOME:$JAVA_HOME/bin:$ANT_HOME/bin

export PATH


note: $PATH is how your current path is configured. If you type in echo $PATH in the command line, you should see something like this
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:

The colon ":" is simply just the delimiter.

Once you've edited your .bashrc, reboot your pc (or type ctrl + alt + backspace) for your new settings to take effect. After you've rebooted, type the following from the command line and see the results :

echo $JAVA_HOME


See :

http://java.sun.com/docs/books/tutorial/essential/environment/paths.html

linux: Add RealPlayer in your Ubuntu

wget -c http://www.debian-multimedia.org/pool/main/r/realplay/realplayer_10.0.9-0.1_i386.deb
sudo dpkg -i realplayer_10.0.9-0.1_i386.deb

See :
http://www.howtoforge.com/the_perfect_desktop_ubuntu_gutsy_gibbon_p6

Monday, October 02, 2006

linux: creating symbolic link for java

Symbolic link (aka symlink or shortcut in windoze)

ln -s /usr/java/jdk1.5.0_09/bin/java /usr/local/bin/java
ln -s /usr/java/jdk1.5.0_09/bin/javac /usr/local/bin/javac
ln -s /usr/java/jdk1.5.0_09/bin/javadoc /usr/local/bin/javadoc

linux: How to find where a program is located

To find where firefox is installed, type:
which firefox

To find where java is installed, type:
which java

java/linux: Installing JDK/JavaSE

From command prompt, su as root.

create dir /usr/java
place jdk-1_5_0_09-linux-i586.bin in /usr/java

chmod 777 jdk-1_5_0_09-linux-i586.bi

From /usr/java type
./jdk-1_5_0_09-linux-i586.bin

JDK is now installed in /usr/java/jdk1.5.0_09

linux: How to uninstall a (non-rpm) program

User brute force uninstall :
rm -rf /thedirwhereyourprogramresides