LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help with keywords please ! (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-keywords-please-499158/)

DarkLeon 11-06-2006 12:37 PM

Help with keywords please !
 
This is my first day using ubuntu linx and I need to download the java envirnoment from java.sun.com to use the JDK and JRE

The problem is that I think I downloaded the the JDK but I don't know how to check for sure or I don't know if I saved it in the right path.

I began to check in the terminal, but I do not know none of the keywords I would use to look into a directory, change a directory, etc, so can anyone please help me with the keywords I need to look for and operate my JDK.


thanks, friends

pljvaldez 11-06-2006 12:52 PM

Here are some more detailed things about moving around in linux.

Here is a cheat sheet.

Here is a guide to installing things on Ubuntu, including the java JDK and JRE.

DarkLeon 11-06-2006 12:58 PM

How can I tell if I am in my c drive? Or is it called something else in ubuntu ?

pljvaldez 11-06-2006 01:03 PM

Well, in linux it is definitely called something else. But you can type pwd to see what directory you're in right now.

I'd need to see the output of fdisk -l (you might have to run it as the root user). And the output of the command cat /etc/fstab to really make an educated guess.

matthewg42 11-06-2006 01:39 PM

Quote:

Originally Posted by DarkLeon
How can I tell if I am in my c drive? Or is it called something else in Ubuntu ?

First, some background...

Linux doesn't have the same concept of drive letters as windows. Everything is part of a single virtual filesystem, starting simply as / (the root directory).

When you have extra disks or extra partitions, they are mounted at some place in the virtual filesystem.

A simple example might be like this:

The machine has two hard disks. The first disk is mounted as root - it's files appear under the root directory /. The second drive is mounted under the /home directory, so everything under there is from the second disk.

When removable drives are connected to the machine, they are auto-mounted in sub-directories of the /media directory. For example, a USB pendrive gets mounted at /media/usbdisk, and all it's files are found in that directory.

The /etc/fstab file tells Linux where to mount different drives / partitions.

The extra bit of information you need to know to understand /etc/fstab is how Linux names drives and partitions. Here are a few of the common ones:

/dev/hda is the master drive on the first IDE channel. Partitions on that drive get numeric suffixes, so /dev/hda1 is the first primary partition of that drive, /dev/hda2 is the second primary partition and so on. Logical partition numbers start at 5.

/dev/hdb slave drive on the first IDE channel (second drive on the first IDE cable).

/dev/hdc is the master device on the second IDE channel. This is typically a CD drive.

/dev/hdd is the secondary slave IDE drive

/dev/fd0 is the first floppy disk drive

/dev/sda is the first SCSI drive

/dev/sdb is the second SCSI drive, etc.

Bare in mind that USB drives are handled through the SCSI driver system in Linux, so the get a /dev/sd? device name.

Partition numbers apply to all devices if the device supports partitions.

Knowing this, you can make some sense of the /etc/fstab file. In the example outlines above, it might look like this:

Code:

/dev/hda1  /    ext3  defaults,errors=remount-ro  0  1
/dev/hdb2  /home ext3  defaults                    0  2

OK, this is over-simplified because swap (virtual memory) is also described in the /etc/fstab, as well as things like the proc filesystem (which allows you to get information about the OS's state, like CPU details, process accounting information etc).


One last complication, the fstab file can use the volume label or drive serial number instead of the /dev/hd? name. Ubuntu Edgy does this by default, but it shows the /dev name in a comment above the line with the serial number.

OK, in this example we can see that the primary partition on the primary drive on the first IDE channel is mounted as root, and that the first primary partition of the slave drive on the first IDE channel is mounted as /home. The meanings of the other columns in this file can be fstab manual page (type "man fstab" to see it).

OK, to the answer of your question! Phew, took some time getting here, sorry!

There's a utility program called "df" which is installed on pretty much every Linux and Unix machine. If you tell it some directory/file name, it'll report the free space on the drive which that directory/file resides on. The nice thing it that it prints the device name on which the directory/file resides.

For example, to see the free space on the device on which the file /usr/share/doc/lsb-base/README.Debian resides (this is just some random filename I pulled out of the air), do this:
Code:

df /usr/share/doc/lsb-base/README.Debian
Filesystem          1K-blocks Used Available Use% Mounted on
/dev/hda4            13733236  5742960  7292656  45% /

The output tells you that this file is on the device /dev/hda4, which is mounted as the root directory, "/". This is the forth primary partition on the master drive on the first IDE channel.

DarkLeon 11-06-2006 01:53 PM

thanks a lot guys I really, really appreciate it a lot any more tips for me ?

pljvaldez 11-06-2006 01:56 PM

As a newbie, I'd try to take some time and go through the RUTE user's guide. It'll help you understand an awful lot about Linux in general, including commands and stuff.

matthewg42 11-06-2006 03:37 PM

My newb tips:
  • Prefer installing software through your distros package manager to other methods. In SuSE that's YaST, in Ubuntu it's Synaptic or Adept (or apt from the command line). In Redhat/Fedora I'm not 100% sure what the graphical installer is called, but the command line version is called Yum I think. The reason is that package managers will automatically install anything which is needed by that program (many Linux softwares requite other programs to be installed for them to work). Also you'll not have to deal with the sometimes exasperating details of compiling and installing from sourcecode.
  • There's usually multiple ways to do something, and it can vary from distro to distro. Usually the GUI tools vary more, and the command line methods vary less from distro to distro. That's why a lot of people give command line solutions here - they're usually more generic (as well as the fact that command line solutions are much easier to communicate in a forum - it's usually just a matter of copy-pasting which is much easier to instruct someone in that "click the first checkbox in the second frame down from the left in the settings tab of the preferences dialog..."
  • Most programs have a manual page. There are also manual pages for file formats (like /etc/fstab), and other useful things. Manual pages have a structure. Basically the overview information is at the top, and it gets more detailed as you go down the page. They have a certain style and syntax. Once you're used to it, they're brilliant.
  • You can search for keywords in manual pages using the "man -k whatever" command.
  • Improve your desk today, make a paper Tux!
  • Don't be afraid to ask questions. There are some grumpy people who might give you a grumpy answer, but for every one of those there's several who will help, or at least join you in saying "yeah, I want to know how that works too!". The Linux user-base is growing, so there are plenty of people who are learning stuff to talk to - some of whom will know the answer to your problem, and some of whom will have problems you know the answer to. Just ignore the grumpy types.
  • Make regular backups
  • Try out different distros. LiveCDs are good for this, but there's nothing like doing a proper install and administrating a machine properly.
  • Have a lot of fun. If it becomes no fun, don't beat yourself up trying to enjoy it :D


All times are GMT -5. The time now is 01:20 AM.