Step 4: Set up a Screen

Screen will allow you to keep running the CLI even if you’re disconnected or you log out from your server.

  1. Install screen:

    sudo apt update && sudo apt install screen
  2. Start a screen session:

    screen -S xai

This will open a screen session, create a new window, and start a shell in that window.

The first time you start a screen, you’ll see a page of license information. You can press the Space bar to read the second page or Enter to return to the command prompt.

To verify that you set up a Screen session, type screen -ls in a second terminal. You should see a message that looks as follows:

There is a screen on:
	82824.xai	(12/09/2023 11:04:52 AM)	(Attached)
1 Socket in /run/screen/@root.