LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Command line prompt has changed (https://www.linuxquestions.org/questions/linux-newbie-8/command-line-prompt-has-changed-484523/)

une 09-18-2006 12:26 AM

Command line prompt has changed
 
I recently bought a router (Billion 7404VGP) and replaced my dial-up internet connection with an ADSL connection via eth0.
This connection activates at boot. My ISP is named "internode".
I now notice that the prompt at the command line has changed from what it used to be.
The prompt now takes the form of;
[myname@internode]$

I cannot remember what it used to be, but the word "internode" was definately not there.
I think it may have been
[myname@localhost]$


I have now found that when I try to execute some simple Java commands such as javac, I get an error that reads;
bash: javac: command not found
Even entering;
[myname@internode]$ java -version
results in a similar error.

The java tools cannot be found anymore. I set the classpath a long time ago when I first installed the Java Development Kit and previously used java commands without problems. Do I now have to add something new to the classpath because of the new "internode" Internet connection?

Connecting to the Internet via eth0 and the router has done something I do not understand, both to the command line prompt and access to my system's Java tools.

Samotnik 09-18-2006 01:52 AM

Well, it's OK with your prompt, it prints your host name.
And it can't affect your Java installation. Check if this commands are in the directories from PATH variable.

cs-cam 09-18-2006 02:17 AM

Quote:

Well, it's OK with your prompt, it prints your host name.
To elaborate, when you were on dial up your computer was directly connected to the internet and your hostname and a few other things were being dictated by your net connection. Now the router is the connected device, not your computer.

une 09-19-2006 10:51 PM

Thanks. I am guessing that if I closed the eth0 connection, that the command line prompt would change back to what it used to be (ie "localhost" rather than "internode"). Is this true?

As far as my Java commands are concerned, it seems a little too coincidental that as soon as I connected the router (which caused the host name to change at the command line prompt) that my ability to execute Java commands from the command line suddenly stopped.

As far as the PATH is concerned, if I enter
[user@ispname user]$ env
I look down the list and see that PATH is as follows;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/share/pvm3/

Would I simply add a path to the directory where Java is anstalled to allow it to be accessed?
ie add
:/usr/java
If so how do I edit it? I tried
[user@ispname user]$ emacs env
but this didn't seem to give me access to the PATH for editing.

Also to try I want to try and work backwards on how the command line prompt is constructed.
Can anyone tell me what file the command line prompt gets the string that represents the hostname from?
For example in my new prompt;
[user@ispname user]$

What file did the string
ispname
come from?


All times are GMT -5. The time now is 12:52 PM.