---
# System prepended metadata

title: 'NOTE: Enable Linux Serial Console'
tags: [linux]

---

NOTE: Enable Linux Serial Console
=================================================================================

Overview:
---------------------------------------------------------------------------------
在Single-Board/伺服器MB進行開發/測試時, 不一定都具備影像(VGA)輸出, 這時就透過console port進行指令的輸入, 並監控系統輸出

Do configuration on /etc/default/grub
---------------------------------------------------------------------------------
command: `sudo vim /etc/default/grub`
原始的設定如下:
![](https://i.imgur.com/Sg1iXBs.png)

在`GRUB_CMDLINE_LINUX=""`中加入console輸出, 經由ttyS0, Baud值為115200
![image](https://hackmd.io/_uploads/HJ00aKH2C.png)

接著使用以下指令更新grub
command: `sudo update-grub`
![](https://i.imgur.com/gf6MjBY.png)


完成後, 重啟即可

Ref.
---------------------------------------------------------------------------------
https://zhuanlan.zhihu.com/p/447014333
https://www.linusakesson.net/programming/tty/index.php
https://blog.csdn.net/weixin_43863487/article/details/107951863