0

As we know that we could actually add external source file from our ~/.bashrc file. For example I have a list of my custom aliases to be included inside it. To do it I simply add inside the file:

source /path/to/my/external/file

or I could simply replace 'source' with dot (.) like so:

. /path/to/my/external/file

Then I can access all my custom aliases without manually typing it inside the ~/.bashrc file.

My question is:

I was wondering is there a similar way to include external source file inside /etc/hosts file? I've tried the same method above, but it doesn't seem to work.

Thanks and CMIIW.

JoenMarz
  • 143
  • 3
  • 13

1 Answers1

0

There is no way to include external source file/s inside /etc/hosts unlike how it's done with ~/.bashrc or any other systems on Linux.

Trevor
  • 1,111
  • 2
  • 18
  • 30