In Linux, a directory is dedicated to the device files and is named “/dev”. These are not the original files on the disk but are just like the abstractions. However, most of the devices are represented virtually. This file includes the entries in /dev/pts console devices. By practicing this practice, an error occurs “cannot open your terminal dev pts 0 please check” for some reason.
This guide describes all the possible solutions to resolve this error. The guideline of this guide is defined below:
- Reason: Due to Switching the User
- Solution 1: Directly Login as a Root User
- Solution 2: Use the command “script /dev/null”
Let’s start today’s guide.
Reason: Due to Switching the User
While switching the user using “sudo su” or “su” commands, the screen session may halt and will return the error. For example, the system is logged in to the user “henry”:
The “henry” is not the root user. Now type the “screen” command in the terminal and press the enter key to run the “screen” session:
After that, it displays an error that “cannot open your terminal dev pts 0 please check”. To resolve this error, we have provided two solutions in this article.
Let’s start with solution 1.
Solution 1: Switch to the Root User
The first solution is to log out from the terminal and then log in as a root user. On the other hand, use the below command to log in to the current system as a root user:
$ sudo su
Next, type the “screen” command on the terminal and run it:
The output displays that the “screen” command is not found in the current Ubuntu 22.04 Linux system. But it can be installed with the below command:
apt install screen
The “screen” is successfully installed in the entire system now run it without any error “cannot open your terminal dev pts 0 please check”, as shown in the screenshot:
The “screen” session is successfully installed, having the latest version “4.09.00”.
Solution 2: Use the command “script /dev/null”
Here, another solution is provided to resolve the error “cannot open your terminal dev pts 0 please check”. Execute the “script /dev/null” right before attaching the “screen” session:
$ script /dev/null
Now run the “screen” command and run it without any error.
That’s all about this guide.
The “cannot open your terminal dev pts 0 please check” can be resolved by “Directly Login as a Root User” instead of switching users via the “sudo su” or “su” command. If this solution does not work, type the “script /dev/null/” script and run the “screen” session. This guide illustrates all the possible solutions to resolve the error.