Horje
What is a Controlling Terminal in Linux?

Most of you should be aware of the Terminal in Linux which is a Command-line Interface. However, there are very few individuals who know about the existence of Linux Controlling Terminal.

If you are a System Administrator, or a user who interacts with Linux Systems, then knowing about Controlling the Terminal on Linux is very important. This article will discuss the Linux Controlling Terminal along with the way to execute it.

What is the Controlling Terminal in Linux?

A Simple Linux Terminal is the Command-Line Interface where users can put any command & get the required output from there. However, when you put Linux Commands there & a process is going on, the Normal Terminal will be called the Controlling Terminal. For each of the sessions with a single command, such transformation can be seen.

Suppose, you have given the ‘ls’ Linux Command in the terminal to check the list of files, then the Normal Linux Terminal will become the Controlling Terminal on Ubuntu for the ‘ls’ Command. The Controlling Terminal permits you to give inputs through the keyboard & check the output change on the screen.

The Controlling Terminal works like the Tree Structure. When you initiate any operation on Linux Terminal Controlling, it becomes the Parent Controlling Terminal. And each & every later operation on it will be considered as the Child Controlling Terminal. In this way, you can move deeper into the Process Controlling in Linux.

How to List Processes that Use Controlling Terminal in Linux?

Step 1: If you want to List Controlling Terminal Processes, then the following Linux Command should be used. All kinds of sessions initiated by different users will be listed using this command.

Command: ps aux
1--AUX-Command

Step 2: If you want to reduce the List Appearance of Controlling Terminal Processes, then the following command is used.

Command: ps aux | less
2--Less-Command

Step 3: If you want to check the first Three Controlling Terminal Processes, then the below-mentioned command will be used.

Command: ps aux | head
3--Head-Command

Why Many Processes can’t utilize Controlling Terminal on Linux?

Now, when you list down the processes that are accessing the Control Terminal on Linux, you can see that many processes have the Question Mark Symbol (?) in their Terminal Interface or TTY. This shows that the Operation on Linux is not associated with any kind of Terminal Interface or Controlling Terminal.

4--Question-Marks

When you execute the above commands, there are multiple times when in the TTY Column there are Question Marks (?) are available. Then, you have to understand that it is not an operation that is launched by any user. There are multiple reasons for which you can see such a Question Mark (?) there.

  • Background Process: Like every other operating system, in the Linux Distributions as well, there are multiple Background Operations present. Most of the background operations aren’t associated with the Linux Terminal. So, the Question Mark is present after them.
  • Detached Process: Sometimes, many applications get started with the Linux Terminal. But after a few moments, the device itself detached the process from the terminal. This leads to the presence of the Question Mark in the TTY as any Controlling Terminal is not associated there.
  • GUI Process: As a user on Linux, if you open any Graphical User Interface Application, then the process will not be marked in the Controlling Terminal. As the GUI Application interacts with users in the form of Graphics, there is no need to associate with the Terminal.
  • Kernel Threads: Many operations are executed in the Kernel Space. And they never interact with the User Space from where any application can access the Terminal. If you list down the Service Loader on Controlling Terminal, these services will also be visible with the Question Mark.
  • Network Services: If any services are handling the Network Process, then Question Mark (?) will be available after them. Suppose, if any Web Server is running or a Database Server, then they can be seen with the Question Mark in the Controlling Terminal.

Conclusion

In the end, we can say that the Controlling Terminal on Linux Distributions is nothing but a deeper aspect of the Simple Linux Terminal. There are very simple Linux Commands are present to check all the Sessions associated with Linux Controlling Terminal. The Controlling Terminal in Linux will be best needed in Linux Process Management.

What is a Controlling Terminal in Linux – FAQ’s

What is a Controlling Terminal in Linux?

The Controlling Terminal is nothing but a variation of a simple Linux Terminal. When any command is executed in the Linux Terminal, it becomes the Controlling Terminal of that particular Linux Command or Operation. In the Controlling Terminal, one can generate inheritance processes as well.

How to check processes using Controlling Terminal in Linux?

To Check the processes using the Controlling Terminal in Linux, the Linux Command “ps -aux” should be used. This is the command that lists down all the processes getting executed in the Controlling Terminal on Linux. Also, you can use the Less and Head variations there to reduce down or get some simple entities in the terminal.

Why do some processes have Question Mark (?) in the TTY Column of the Linux Controlling Terminal?

In the Controlling Terminal, there are many processes marked with the ‘?’ in the TTY Column. In Controlling Terminal, the TTY is the Column Name that refers to the Terminal Interface. This denotes that the process is not associated with any Terminal or Controlling Terminal.




Reffered: https://www.geeksforgeeks.org


TechTips

Related
How to Compile and Run C program in Terminal? How to Compile and Run C program in Terminal?
How to Optimize Your Smartphone Camera Settings? How to Optimize Your Smartphone Camera Settings?
How To Track Your Stolen Smartphone? (iPhone or Android) How To Track Your Stolen Smartphone? (iPhone or Android)
How to Run C program in Ubuntu? How to Run C program in Ubuntu?
How to Install Grafana Loki on Ubuntu? How to Install Grafana Loki on Ubuntu?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
27