Command to find Linux terminal of the process [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have pid of a process on linux machine.I want to retrieve the terminal/console on which the standard output is getting displayed.

The ps command can do it.
ps -o tty -p $pid

Related

How can I get a list of all open named pipes in linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Is there a easy way to list all open named pipes on linux? O a bash command to show all open named pipes?
An option: you can use the lsof command line tool: https://www.simplehelp.net/2010/04/09/how-to-get-a-list-of-open-files-sockets-and-pipes-in-linux/

How to what program each logged in user is executing in linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
What command line would give me a list of programs each logged in user is executing for a Linux server using bash?
You can use the w command for this.
As #ivanivan mentioned, a more complete listing can be accomplished using ps, usually coupled with grep to filter out what you don't want.

How to check which user is positioned in a directory on linux terminal? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
yesterday i was shown that i can't unmount a mounted partition (like /media/test or /mnt/test) if someone is using the terminal in that directory (maybe in ssh connection).
he used a command that listed the user on that directory with pid of process in order to kill the pid and unmount the partitions.
I don't remember the command, could you help me?
ty
This one works nice:
lsof | grep '^bash.*cwd'

How can i stop someone from spamming my console using the write command in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
How can I block someone from spamming by console using the "write" command in unix.
Run the command mesg n. Preferably, add it to your .bashrc or equivalent so it runs when you start up.
In your console, type:
mesg n
For more information, read the manual pages (man mesg).

Unwanted message when opening the shell [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I just uninstalled a program (ros) from my computer (ubuntu) using the ubuntu software center.
However, since this moment, whenever I open a shell, I get the following message:
bash: /opt/ros/groovy/setup.bash: No such file or directory
Did I do anything wrong?
Have a look at ~/.bash_profile

Resources