ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How do I modify my hosts file?

user-image
تم إضافة السؤال من قبل Zaid Rabab'a , Software Development Team Leader , Al-Safa Co. Ltd.
تاريخ النشر: 2013/12/10
Asif Ali M
من قبل Asif Ali M , Project Lead , LiquidHub

you should have root access or you should be the sudo user to modify.

The default location of the file in linux is /etc/hosts to modify

 

open a terminal then type "sudo vi /etc/hosts"

 

sherin villannassery
من قبل sherin villannassery , Software Engineer , Ti Technologies

The owner of a file/directory, use chown. For example:

sudo chown your_username file_or_directory

Check man chown and man chmod for more information.

But, be careful, it is not a good idea to became the owner of a system file/directory! So, if you want to edit a system file is not necessary to be the owner of that file. Just use in terminal:

sudo -i # to grant access as root gedit file_name # or /path/to/file/file_name

After you finished to edit your file, press Ctrl+D in terminal to exit from root session.

Clodelio Delfino
من قبل Clodelio Delfino , Managing Consultant , Startup Company

in windows:

systems32/drivers/etc/host

 

in linux:

/etc/hosts

 

Any text editor will do the job as long as you have privilege or access to modify it. e.g. root, administrator.

for what purpose do you need to modify file.. there is a seperate files for each thing and it depends on linux flavor as well. more or else all of them has same file naming convention but you need to be specific about this your requirement. 

 

 

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟