我有一台运行Ubuntu服务器的机器。 它只有一个命令行界面。 我怎样才能让系统自动login一个特定的用户(我不想input用户名/密码)。 我知道这是不安全的,我不在乎。
安装mingetty 。
mingetty
sudo apt-get install mingetty
编辑你的/etc/event.d/tty1并改变这一行:
/etc/event.d/tty1
exec /sbin/getty 38400 tty1
至:
exec /sbin/mingetty --autologin username tty1