6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

コンソール接続

Last updated at Posted at 2021-07-14

想定
Macにてルータやスイッチのコンソールポートに接続する状況下

シリアルポートを確認

ls /dev/tty.usb* 
/dev/tty.usbserial-FT0AHUA2

確認したポートに対してscreenコマンドで接続

screen /dev/tty.usbserial-FT0AHUA2

一つのシリアルポートしかなければ、こちらでもよい

screen `ls /dev/tty.usb*`

ルータに接続したら「exit」でも抜けられないため以下入力
Ctrl Aの入力後、Ctrl Dを入力する

Ctrl A + Ctrl D

アタッチしたままセッションを切った時に再接続する。

screen -r

プロセスの確認

(base) WatanabenoMacBook-puro:~ hiroki$ ps
  PID TTY           TIME CMD
64747 tty.usbserial-FT0AHUA2   0:00.11 SCREEN /dev/tty.usbserial-FT0AHUA2
74609 ttys000    0:00.03 -bash

プロセス削除と確認

(base) WatanabenoMacBook-puro:~ hiroki$ kill 64747
(base) WatanabenoMacBook-puro:~ hiroki$ ps
  PID TTY           TIME CMD
74609 ttys000    0:00.03 -bash
6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?