Register now or log in to join your professional community.
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"
The owner of a file/directory, use chown. For example:
sudo chown your_username file_or_directoryCheck 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_nameAfter you finished to edit your file, press Ctrl+D in terminal to exit from root session.
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.
Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.