DEV Community

Mark Nefedov
Mark Nefedov

Posted on

1 1

Setup screen session for interviewee monitoring

This tutorial provides a step-by-step guide on setting up a shared screen session for a Linux interview. By following these steps, you can give the interviewee access to a Linux box while monitoring their inputs. Although the steps are mostly similar for all Linux distributions, minor adjustments may be required for different shells.

Step 1: Create a User for the Interviewee

First, create a new user account for the interviewee using the useradd command. The -m flag creates a home directory for the new user.

useradd -m interviewee
Enter fullscreen mode Exit fullscreen mode

Step 2: Install the screen Utility

The screen utility allows you to create and manage multiple terminal sessions. If it's not already installed on your system, use the appropriate package manager command for your Linux distribution:

  • For SUSE:
zypper in screen
Enter fullscreen mode Exit fullscreen mode
  • For Debian/Ubuntu:
apt install screen
Enter fullscreen mode Exit fullscreen mode
  • For RHEL/Fedora:
dnf install screen
Enter fullscreen mode Exit fullscreen mode

Step 3: Modify the .profile File to Create a screen Session at User Login

Next, update the .profile file in the interviewee's home directory to automatically create a screen session when they log in. Use the echo command to append the necessary line to the file:

echo "screen -S interviewee-session" >> /home/interviewee/.profile
Enter fullscreen mode Exit fullscreen mode

Make sure to replace /home/interviewee with the actual path to the interviewee's home directory if it's different on your system.

Step 4: Access the Shared Screen Session

Now you can give the interviewee their credentials, and they can log in to the system. To monitor their actions, switch to the user account you created and access the shared screen session using the following command:

screen -x interviewee-session
Enter fullscreen mode Exit fullscreen mode

That's it! You've successfully set up a shared screen session for a Linux interview.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay