ubuntu command change line in file

ubuntu command change line in file

sed -i 's/# autologin=dgod/autologin=ubuntu/' /path/to/file

Source: askubuntu.com