LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to I modify the /etc/host file? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-i-modify-the-etc-host-file-786270/)

valencp 02-01-2010 02:36 PM

How to I modify the /etc/host file?
 
Hello,
I am in the process of setting up an Asterisk server with Broadvoice services. I am having issues with making outbound calls and Broadvoice suggests I modify the /etc/hosts file in order to add their proxy server IP address and name.

I login to my server as root and get the following command line header

[root@root tmp]#

I entered cd thinking this is what I need to change directory but fails.

What is the command I need to enter in order to get to the /etc/host file so I can change it? How do I confirm an /etc/host file even exists?

Thanks...

jschiwal 02-01-2010 02:48 PM

cd /etc/

ls /etc/hosts

In a script " if [ -f /etc/hosts ] ; then ..."

You can open the file using the full path.

e.g.
sudo vim /etc/hosts

jefro 02-01-2010 08:59 PM

Seems odd to me. Usually hosts are not for proxy server ip's.

I kind of assume you have some remote server that you are leasing and not really owned or have access to. Can you tell us more about what you have an how you got it?


All times are GMT -5. The time now is 11:39 PM.