虛擬機器裡的Ubuntu sudo時卡住
ofollow,noindex" target="_blank">https://serverfault.com/questions/38114/why-does-sudo-command-take-long-to-execute
今天裝了一個虛擬機器,其他都很快,但是執行sudo的時候卻非常的卡,要等好幾秒鐘,搜了一下,是這麼個解決法,把主機名加到/etc/hosts
裡,原因是安裝過程中,hostname沒有追加到/etc/hosts
裡。
那麼為什麼sudo要讀取/etc/hosts
呢?原因在這裡:https://superuser.com/questions/429790/sudo-command-trying-to-search-for-hostname