sir, over department created a host file to run over office program in windows, but they give us dell system having operating system ubuntu 16.4 now my question is that how this add file in ubuntu to run the program. the windows command is given below

TO ACCESS FIORI - Please Follow the Instructions in this Video

Path:- C:\Windows\System32\drivers\etc

Copy attached Hosts File in the above path.

Fiori Link to access SAP in Google Chrome: http://ac-hana-2.abacus-global.com:8005/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?sap-client=500&sap-language=EN#Shell-home

  • Possible duplicate of How do I edit the /etc/hosts file?
    – Panther
    Sep 11 '18 at 6:39
  • Link isn't working.
    – Kulfy
    Sep 11 '18 at 6:40
  • 1
    Why do you not ask that department how to do that?
    – Rinzwind
    Sep 11 '18 at 6:41
  • they say to change your OS, but i like it ubuntu, so i want to run this hosts file on it Sep 11 '18 at 7:00

This same file in Ubuntu is /etc/hosts (note that it's all lowercase, this is important in Linux)

In addition:

Bluntly copying over the provided hosts will not result in a good file, because 1) it could be in Dos format (CRLF line ends) and 2) it could remove useful things that are in your current /etc/hosts.

You need root privileges to overwrite it, the recommended procedure is to:

  • make a copy of the current file to safe place (no privs necessary)
  • make a second copy and edit it to insert the additional names from the provided file
  • copy the result with sudo

    sudo cp newhosts /etc/hosts

You can test right away, no need to reboot.

But as other have said, having people change their hosts file is rather uncommon, if it's to define one specific node for an application it could be OK, if it changes the address of systems you already use it could be a trojan.

  • sir, if i send you that particular host file can you help me how to add the same??? i mean i am new user of ubuntu Sep 11 '18 at 9:59
  • No, because it's just a bunch of simple commands to use and I can't issue them for you. You must be a very, very new user is you don't know how to copy files and start an editor.
    – xenoid
    Sep 11 '18 at 12:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.