Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/hosts equilvalence
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
wokick
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2004
Posts: 97

PostPosted: Thu Dec 22, 2005 1:09 am    Post subject: /etc/hosts equilvalence Reply with quote

Is there any file functioning like /etc/hosts file, but you can put it under your home directory.

I have serveral machines without domainname, and I hate to type the IP addresses everytime when I need to access them. Unfortunately, I have no priviledge to edit /etc/hosts file.

Thank you!
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20589

PostPosted: Thu Dec 22, 2005 3:48 am    Post subject: Reply with quote

I'm not aware of any such file, but you could probably get by with a few scripts or shell variables. For example, in ~/.bashrc, you could add some variables like this:
Code:
BOX1=192.168.1.37
BOX2=192.168.1.38
Then, you could use commands like this:
Code:
ping $BOX1
ping $BOX2


Depending on the command, a script or alias may be more useful.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum