Skip to content

Instantly share code, notes, and snippets.

@mertbozkir
Created September 20, 2024 00:21
Show Gist options
  • Save mertbozkir/69429a58ff2ba482d50c1cb65812e957 to your computer and use it in GitHub Desktop.
Save mertbozkir/69429a58ff2ba482d50c1cb65812e957 to your computer and use it in GitHub Desktop.
Showing executed commands and outputs on thinkpad server!

To watch and monitor the Tailscale session commands and their outputs on your ThinkPad (Ubuntu server) without a GUI, you can use a terminal-based monitoring tool. One excellent option for this is tmux (Terminal Multiplexer). Here's how you can set this up:

  1. Install tmux on your ThinkPad:

    sudo apt install tmux
    
  2. Start a new tmux session:

    tmux new -s tailscale_monitor
    
  3. In this tmux session, you can split the screen and run different commands. For example:

    • To view Tailscale status:

      watch -n 5 tailscale status
      
    • To monitor Tailscale logs:

      sudo journalctl -fu tailscaled
      
  4. You can create multiple panes in tmux by pressing Ctrl+B then % for vertical split or " for horizontal split.

  5. Switch between panes using Ctrl+B then arrow keys.

  6. To detach from the tmux session (leaving it running in the background), press Ctrl+B then D.

  7. To reattach to the session later:

    tmux attach -t tailscale_monitor
    

This setup allows you to monitor Tailscale activities in real-time without a GUI. You can customize the commands and layout to suit your specific monitoring needs.

Would you like me to explain more about tmux or suggest other monitoring commands for Tailscale?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment