Локальный файл хоста должен быть похожим на это:
127.0.0.1 localhost
127.0.0.1 alex-pc
Чтобы иметь другое подключение ПК к alex-ПК, необходимо добавить DNS запись на маршрутизаторе (если это поддерживает его) указать на ПК на локальный адрес локальной сети. Или добавьте alex-ПК в весь свой файл hosts ПК. Если Ваш маршрутизатор не поддерживает его. Установите маленький сервер DNS на компьютере и укажите на все Ваши ПК на тот компьютер для запросов DNS. Или измените сервер DNS в своих настройках DHCP и выпустите/возобновите Ваши другие ПК. Существует недостаточно деталей в Вашем вопросе дать больше более точную фиксацию.
To fix the problem permanently without disabling hashing entirely, put this in your bashrc:
shopt -s checkhash
See my other answer for how to solve the immediate problem.
This can happen if the new copy isn't executable, so have a look at its permissions and ensure they're correct.
To clear the immediate problem:
hash -r
To stop it happening again:
set +h
to disable hashing (i.e. in-memory caching).
This can be put in a bash startup file such as /etc/bashrc
.
The downside of this solution is that it slows things down a little if you have slow network filesystem(s) mounted and on the PATH.
Really, in my opinion, this is an ancient bash bug which should have been fixed years ago, and this is just a workaround.