Enable Serial Console on Ubuntu 18.04

Pada ubuntu 18.04, by default remote command line lewat console masih belum aktif, sehingga kita perlu mengaktifkannya secara manual agar kita bisa meremote ubuntu dengan menggunakan serial console. pertama, ketikkan perintah untuk mengedit file grub  :

# nano /etc/default/grub

Kemudian cari tulisan “GRUB_CMDLINE_LINUX” yang biasa nya terletak di baris nomor 11.

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
...

Kemudian ganti baris tersebut dengan GRUB_CMDLINE_LINUX=”console=ttyS0 console=tty0″ sehingga menjadi seperti berikut :

# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="console=ttyS0 console=tty0"
...

Save file tersebut kemudian ketikkan perintah :

# update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-29-generic
Found initrd image: /boot/initrd.img-4.15.0-29-generic
done

Setelah itu reboot, dan uji dengan cara remote lewat serial console.

Ubuntu 18.04.1 LTS nms ttyS0

nms login:

Terimakasih

 

Tinggalkan komentar