LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-02-2007, 11:43 AM   #1
cad
Member
 
Registered: Dec 2006
Distribution: Fedora core 4
Posts: 92

Rep: Reputation: 15
how to check if working on local computer or a server


I am a and so I love to use ssh and telnet but the problem is that sometimes i forget where i am working or whether i am connected to some server through telnet
w does give a hint but I am unable to determine where i am(IP address and name).
Please help
 
Old 01-02-2007, 11:46 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well ifconfig will tell you the ip address, and hostname will tell you the hostname... is that all you want to know?
 
Old 01-02-2007, 12:10 PM   #3
cad
Member
 
Registered: Dec 2006
Distribution: Fedora core 4
Posts: 92

Original Poster
Rep: Reputation: 15
Thankyou. But ifconfig generates : command not found
 
Old 01-02-2007, 12:30 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well run /sbin/ifconfig if it's not already on your path.
 
Old 01-03-2007, 05:33 AM   #5
bruj3w
Member
 
Registered: Mar 2004
Location: england
Distribution: slackware
Posts: 164

Rep: Reputation: 30
or be logged in as root
 
Old 01-03-2007, 05:46 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
When I use ssh, the prompt indicates the host I am connected to:
jschiwal@hpmedia:

If I launch a program using KDE, the titlebar indicates which computer it is. In gnome, that isn't the case however.

A can't believe that you can connect to a server using telnet. I hope there isn't any internet access on that network. For direct console connections such as a router, it's OK, but not on a network.
 
Old 01-03-2007, 06:31 AM   #7
cad
Member
 
Registered: Dec 2006
Distribution: Fedora core 4
Posts: 92

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal
When I use ssh, the prompt indicates the host I am connected to:
jschiwal@hpmedia:

A can't believe that you can connect to a server using telnet. I hope there isn't any internet access on that network. For direct console connections such as a router, it's OK, but not on a network.
We have internet access on the network and also there are various ftp
servers where one can connect easily using ftp or telnet

I dont see username@server type prompt please tell me what prompt string should i use to have this done
 
Old 01-03-2007, 07:42 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Code:
[root@server directory]# echo $PS1
[\u@\h \W]\$
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check server/computer details? CPU, HD? newlinuxnewbie Linux - Software 2 09-12-2006 07:42 AM
how can I download (back up) sql database on the linux server to my local computer? jenny1668 Linux - General 5 07-15-2006 01:50 AM
Fail to add a local user in a computer working with NIS pwangee Fedora 2 07-07-2004 09:28 PM
Fail to add a local user in a computer working with NIS pwangee Linux - Networking 0 07-07-2004 10:01 AM
Apache2 Server - not working outside local ip address range Robstro Linux - Networking 3 06-14-2004 05:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration