# Linux note 免密碼 -- * First, if your user has sudo privileges, you must enable its NOPASSWD option. Otherwise, sudo will ask for a password even when you don't have one, and won't accept an empty password. * To do so, open the sudoers configuration file with sudo visudo, and add the following line to the file, replacing david with your username: * ``david ALL=(ALL) NOPASSWD:ALL`` * Close the editor to apply the changes, and test the effect on sudo in a new terminal. * Delete the password for your user by running this command: * ``sudo passwd -d `whoami`` 自動登入 -- * ``sudo mkdir /etc/systemd/system/getty@tty1.service.d`` * ``sudo vim /etc/systemd/system/getty@tty1.service.d/override.conf`` * 首先建立 getty@tty1.service.d 目錄以及 override.conf 設定檔。 ```Script= [Service] ExecStart= ExecStart=-/sbin/agetty --noissue --autologin 帳戶名稱 %I $TERM Type=idle ``` ###### tags: `Linux`