【Linux】 ホスト名を指定/変更するには...

手順概要

[1] /etc/hosts を編集する
[2] ネットワークをリスタート

例:127.0.0.1にホスト名「samplehost」を適用する

[1] /etc/hosts を編集する

sudo vi /etc/hosts
~~~~
127.0.0.1   localhost ・・・略・・・samplehost
~~~~

[2] ネットワークをリスタート

/etc/rc.d/init.d/network restart