Reputation: 3327
Simple question but I can't seem to find the answer to this. When I launch of VM on GCP, I'm getting into the machine via the serial port due to some testing we're doing, but the there what looks like logs from process that continuously log out to the screen (assuming this is stdout when accessing via serial port?). I'm trying to turn this off but can't seem to figure out how to.
here is the version that I'm using:
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Upvotes: 1
Views: 1222
Reputation: 2605
You can let all noisy output to be delivered to the default port ttyS0
(COM1) and enable alternative login prompt on ttyS1
(COM2).
To enable alternative serial port temporarily until next reboot:
$ sudo systemctl start [email protected]
To enable alternative serial port permanently:
$ sudo systectl enable [email protected]
Then you might connect to the enabled alternative serial port ttyS1
from Cloud Shell:
CloudShell:$ gcloud compute connect-to-serial-port my-vm --zone=my-zone --port=2
Upvotes: 1
Reputation: 75970
You have 2 way to deactivate the serial ports, as described in the documentation
Upvotes: 0