How do I check which terminal I am using?Why is a virtual terminal “virtual”, and what/why/where is the...
Combinations of multiple lists
Why doesn't H₄O²⁺ exist?
UK: Is there precedent for the governments e-petition site changing the direction of a government decision?
Watching something be written to a file live with tail
Theorems that impeded progress
Arrow those variables!
If a Gelatinous Cube takes up the entire space of a Pit Trap, what happens when a creature falls into the trap but succeeds on the saving throw?
What mechanic is there to disable a threat instead of killing it?
Twin primes whose sum is a cube
Is it canonical bit space?
Did Shadowfax go to Valinor?
Anagram holiday
Why is Collection not simply treated as Collection<?>
What reasons are there for a Capitalist to oppose a 100% inheritance tax?
Why can't we play rap on piano?
Will google still index a page if I use a $_SESSION variable?
Facing a paradox: Earnshaw's theorem in one dimension
Why does Kotter return in Welcome Back Kotter
Brothers & sisters
Is it legal for company to use my work email to pretend I still work there?
How can I make my BBEG immortal short of making them a Lich or Vampire?
SSH "lag" in LAN on some machines, mixed distros
What is the word for reserving something for yourself before others do?
Should I tell management that I intend to leave due to bad software development practices?
How do I check which terminal I am using?
Why is a virtual terminal “virtual”, and what/why/where is the “real” terminal?What is the point of sh being linked to dash?Gnome-terminal vs Ubuntu-terminal differences?How to start an application from the terminal?What is the command to minimize the gnome terminal?Command to open new terminal window from the current terminal?How to check which shell am I using?How to install simplegui using terminal?how can I close this dropdown terminal?Open already running program via terminalCheck from which directory the program was executedHow I will check that the mongodb service is runing or not using terminal command?How to know which terminal window is running which process
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I have Ubuntu on my machine and I am running awesome window manager on top of it. How do I check which terminal I am running? Is there a command for it?
command-line gnome-terminal
add a comment |
I have Ubuntu on my machine and I am running awesome window manager on top of it. How do I check which terminal I am running? Is there a command for it?
command-line gnome-terminal
3
what do you mean by which? Click Help --> About is that it?
– JoKeR
Jun 23 '15 at 19:34
3
Which terminal meaning the terminal program or the shell ?
– heemayl
Jun 23 '15 at 19:37
add a comment |
I have Ubuntu on my machine and I am running awesome window manager on top of it. How do I check which terminal I am running? Is there a command for it?
command-line gnome-terminal
I have Ubuntu on my machine and I am running awesome window manager on top of it. How do I check which terminal I am running? Is there a command for it?
command-line gnome-terminal
command-line gnome-terminal
edited Jun 24 '15 at 8:56
heemayl
67.8k11142214
67.8k11142214
asked Jun 23 '15 at 19:26
user4943481user4943481
84113
84113
3
what do you mean by which? Click Help --> About is that it?
– JoKeR
Jun 23 '15 at 19:34
3
Which terminal meaning the terminal program or the shell ?
– heemayl
Jun 23 '15 at 19:37
add a comment |
3
what do you mean by which? Click Help --> About is that it?
– JoKeR
Jun 23 '15 at 19:34
3
Which terminal meaning the terminal program or the shell ?
– heemayl
Jun 23 '15 at 19:37
3
3
what do you mean by which? Click Help --> About is that it?
– JoKeR
Jun 23 '15 at 19:34
what do you mean by which? Click Help --> About is that it?
– JoKeR
Jun 23 '15 at 19:34
3
3
Which terminal meaning the terminal program or the shell ?
– heemayl
Jun 23 '15 at 19:37
Which terminal meaning the terminal program or the shell ?
– heemayl
Jun 23 '15 at 19:37
add a comment |
7 Answers
7
active
oldest
votes
The short version (thx @Serg)
cat /etc/alternatives/x-terminal-emulator
The long version
sudo update-alternatives --config x-terminal-emulator
and look for the *
in the output
;)
Example output
There are 7 alternatives which provide `x-terminal-emulator’.
Selection Alternative
———————————————–
1 /usr/bin/xterm
2 /usr/bin/uxterm
3 /usr/bin/koi8rxterm
4 /usr/bin/lxterm
*+ 5 /usr/bin/gnome-terminal.wrapper
6 /usr/bin/konsole
7 /usr/bin/xfce4-terminal.wrapper
Press enter to keep the default[*], or type selection number:
Or, thanks to @muru, here is more detailed output
$ update-alternatives --display x-terminal-emulator
x-terminal-emulator - auto mode
link currently points to /usr/bin/gnome-terminal.wrapper
/usr/bin/gnome-terminal.wrapper - priority 40
slave x-terminal-emulator.1.gz: /usr/share/man/man1/gnome-terminal.1.gz
/usr/bin/koi8rxterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/koi8rxterm.1.gz
/usr/bin/lxterm - priority 30
slave x-terminal-emulator.1.gz: /usr/share/man/man1/lxterm.1.gz
/usr/bin/mate-terminal.wrapper - priority 30
slave x-terminal-emulator.1.gz: /usr/share/man/man1/mate-terminal.1.gz
/usr/bin/uxterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/uxterm.1.gz
/usr/bin/xterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/xterm.1.gz
Current 'best' version is '/usr/bin/gnome-terminal.wrapper'.
2
cat /etc/alternatives/x-terminal-emulator | grep exec
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:59
Is there a utility I need installed? I get eitherBinary file (standard input) matches
orupdate-alternatives: error: unknown argument
–config'`
– Terrance
Jun 23 '15 at 20:06
Nevermind, it is--config
– Terrance
Jun 23 '15 at 20:06
1
You don't needsudo
. Useupdate-alternatives --display x-terminal-emulator
– muru
Jun 23 '15 at 20:34
For the short version you might consider usingfile /etc/alternatives/x-terminal-emulator
to get the target of this symbolic link instead usingcat
on it. Thefile
utility should be installed on most systems and can be used to find the target executable.cat
on symbolic link could print any shell script or even binary file depending on the target of this link (shell script forgnome-terminal
, binary fileurxvt
, etc.).
– chris544
Jul 18 '17 at 3:40
add a comment |
Shell vs Terminal
First thing we need to have clarified is what exactly is being asked - find out the running shell or running terminal. Often these two terms are used interchangeably, but they are different things altogether. Shell is the command-line interpreter, specifically interactive shell is the prompt plus text field where you enter commands. Shells can also be non-interactive, for example a script starts non-interactive shell, or bash -c 'echo hello world'
also starts non-interactive shell.
By contrast, terminal is the interface to shell ( though it could be another application as well). Originally terminal referred to actual hardware, but nowadays they're mostly software. What you see when you press Ctrl+Alt+t or click on the terminal icon in GUI, that starts a terminal emulator, a window which mimics behavior of hardware, and within that window you can see the shell running. Ctrl+Alt+F2 (or any of the 6 function keys) will open virtual console, aka tty
. I recommend reading Why is a virtual terminal “virtual”, and what/why/where is the “real” terminal? for more info on the specifics.
Getting the shell information
Each user has a default shell assigned to them in /etc/passwd
for their username. Assuming you are using default configuration and haven't called another shell explicitly as a command, it is sufficient to do:
echo $SHELL
But of course this only shows default value. Suppose we do the following:
user@ubuntu:~$ dash
$
We were originally in bash
, but started interactive session of /bin/dash
, Ubuntu's POSIX or system shell. The variable $SHELL
won't change, because that's not its purpose - it shows default not current value. We will need to approach this from another perspective - the perspective of a process, which is something I've covered in Am I using bash or sh?
$ echo $$
4824
$ cat /proc/4824/comm
mksh
$ bash
xieerqi@eagle:~$ echo $$
6197
xieerqi@eagle:~$ cat /proc/6197/comm
bash
Here we take advantage of /proc/
filesystem. The name of the process and command-line parameters are displayed in /proc/<pid>/comm
. All we need is to provide shell's PID, which is what $$
does. In the example above I am adding that separately, but there is nothing stopping us from doing just
cat /proc/$$/comm
Another way we could approach this is via checking where /proc/<pid>/exe
. This file is a symlink that points to the executable file.
You can also do ps aux | grep $(echo $$ )
for that same purpose.
If you want to know filename or device name which is connected to stdin. (mostly useful in tty), run tty
command
Many terminals seem to mask themselves as xterm compatible, which is reported by echo $TERM
or echo $COLORTERM
. Virtual terminals are more tricky, as you can see.
What we can do is run xprop
, click on the desired window, grep its pid, and find out what's the name of that process matching pid. Or in other words:
$ ps aux | grep $(xprop | awk -F'=' '/PID/ {print $2}')
xieerqi 2124 0.6 1.7 208068 34604 ? Sl 18:47 1:49 gnome-terminal
Or even more simply :
ps -p $(xprop | awk -F'=' '/PID/ {print $2}')
O_o$SHELL
, sure
– A.B.
Jun 23 '15 at 19:59
Eek. Why do you people useps | grep
?ps -p $$
! Or, just for the command,ps -p $$ -o cmd=
.
– muru
Jun 23 '15 at 20:36
@muru because I'm less experienced user than you are, and I don't have all the ps flags memorized >_< bluntly
– Sergiy Kolodyazhnyy
Jun 23 '15 at 20:42
2
Neither do I, butps | grep
is just bad form. Most of what you can grep, can actually be obtained byps
itself, or by other tools.
– muru
Jun 23 '15 at 20:45
add a comment |
If you want to know the terminal program you are using, use this:
ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
Run this just after opening the terminal (shell) without forking any further shell instance.
When you open up the terminal program, it basically spawns a child program, a shell. So the parent of the spawned shell is the terminal itself. In other words, the PPID of the shell is the PID of terminal program.
Here we are finding the parent process ID (PPID) of the shell (bash
) by ps -o 'ppid=' -p $$
, which will be the process ID of terminal program.
Then we are finding the process name from the PID:
$ ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
gnome-terminal
It is basically a one liner of:
$ ps -o 'ppid=' -p $$
2268
$ ps -o 'cmd=' -p 2268
gnome-terminal
When I run this command I getsshd: username@pts/4
. Note I'm using PuTTY to connect to the machine. Issshd
actually the terminal emulator?
– user3731622
Mar 21 '18 at 17:21
add a comment |
Type in printenv
from the terminal window to view all variables of the open session.
Type in echo $COLORTERM
from the terminal window. NOTE: this does not work with all terminals, one like sakura
does not report this back.
root@terrance-Linux:~# echo $COLORTERM
gnome-terminal
the one below is from an aterm
terminal.
root@terrance-Linux:~$ echo $COLORTERM
rxvt-xpm
echo $COLORTERM in sakura reports blank
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:46
@Serg thank you. It looks like it is a variant of xterm then.
– Terrance
Jun 23 '15 at 19:48
@Serg just wondering if you like Sakura? And what draws you to it?
– Terrance
Jun 23 '15 at 19:52
It's alright, nothing quite special, quite simplistic. I've tried variety of terminal emulators: terminator, roxterm, tilde, the dropdown one (forgot what it's called, something starting with R ). I guess it is a compromise between xterm and gnome-terminal
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:57
@Serg Ah, that is good to know. I am going to check that out. :-) I am always on the look out for a good terminal that works with my keepalive script that sends xdotool keys to them.
– Terrance
Jun 23 '15 at 19:59
|
show 3 more comments
If you just want the name of the terminal program, you'll most probably find it under Help > About.
add a comment |
cat /etc/alternatives/x-terminal-emulator | grep exec
Sample output:
exec('gnome-terminal',@args);
There's the answer for my system: gnome-terminal.
So, typing gnome-terminal
into my terminal will now open up another identical terminal window.
Sources:
- Sergiy Kolodyazhnyy's comment under A.B.'s answer.
add a comment |
Simple answer. Works for both console or ssh.
Example for simple character terminal:
ssh username@systemname
echo $TERM
dumb
tells you that you can't open GUI apps on that connection
Example for xterm (also works with PuTTY/Xming on Windows)
ssh -Y username@systemname -- omit this if using PuTTY --
echo $TERM
xterm
means that you can use GUI commands like opening the leafpad editor or nautilus file manager.
On the console it is the same:
Open terminal window
echo $TERM
xterm
TERM
is not a variable that defines the default terminal emulator, but rather one that defines the capabilities of the current one. For example, setting the variable to "xterm-color" lets any program running in the terminal know that the current terminal is supposed to understand colours; setting it to "linux" tells programs that this is supposed to be a VT; etc.
– Cybolic
Dec 7 '17 at 0:54
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f640096%2fhow-do-i-check-which-terminal-i-am-using%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
The short version (thx @Serg)
cat /etc/alternatives/x-terminal-emulator
The long version
sudo update-alternatives --config x-terminal-emulator
and look for the *
in the output
;)
Example output
There are 7 alternatives which provide `x-terminal-emulator’.
Selection Alternative
———————————————–
1 /usr/bin/xterm
2 /usr/bin/uxterm
3 /usr/bin/koi8rxterm
4 /usr/bin/lxterm
*+ 5 /usr/bin/gnome-terminal.wrapper
6 /usr/bin/konsole
7 /usr/bin/xfce4-terminal.wrapper
Press enter to keep the default[*], or type selection number:
Or, thanks to @muru, here is more detailed output
$ update-alternatives --display x-terminal-emulator
x-terminal-emulator - auto mode
link currently points to /usr/bin/gnome-terminal.wrapper
/usr/bin/gnome-terminal.wrapper - priority 40
slave x-terminal-emulator.1.gz: /usr/share/man/man1/gnome-terminal.1.gz
/usr/bin/koi8rxterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/koi8rxterm.1.gz
/usr/bin/lxterm - priority 30
slave x-terminal-emulator.1.gz: /usr/share/man/man1/lxterm.1.gz
/usr/bin/mate-terminal.wrapper - priority 30
slave x-terminal-emulator.1.gz: /usr/share/man/man1/mate-terminal.1.gz
/usr/bin/uxterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/uxterm.1.gz
/usr/bin/xterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/xterm.1.gz
Current 'best' version is '/usr/bin/gnome-terminal.wrapper'.
2
cat /etc/alternatives/x-terminal-emulator | grep exec
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:59
Is there a utility I need installed? I get eitherBinary file (standard input) matches
orupdate-alternatives: error: unknown argument
–config'`
– Terrance
Jun 23 '15 at 20:06
Nevermind, it is--config
– Terrance
Jun 23 '15 at 20:06
1
You don't needsudo
. Useupdate-alternatives --display x-terminal-emulator
– muru
Jun 23 '15 at 20:34
For the short version you might consider usingfile /etc/alternatives/x-terminal-emulator
to get the target of this symbolic link instead usingcat
on it. Thefile
utility should be installed on most systems and can be used to find the target executable.cat
on symbolic link could print any shell script or even binary file depending on the target of this link (shell script forgnome-terminal
, binary fileurxvt
, etc.).
– chris544
Jul 18 '17 at 3:40
add a comment |
The short version (thx @Serg)
cat /etc/alternatives/x-terminal-emulator
The long version
sudo update-alternatives --config x-terminal-emulator
and look for the *
in the output
;)
Example output
There are 7 alternatives which provide `x-terminal-emulator’.
Selection Alternative
———————————————–
1 /usr/bin/xterm
2 /usr/bin/uxterm
3 /usr/bin/koi8rxterm
4 /usr/bin/lxterm
*+ 5 /usr/bin/gnome-terminal.wrapper
6 /usr/bin/konsole
7 /usr/bin/xfce4-terminal.wrapper
Press enter to keep the default[*], or type selection number:
Or, thanks to @muru, here is more detailed output
$ update-alternatives --display x-terminal-emulator
x-terminal-emulator - auto mode
link currently points to /usr/bin/gnome-terminal.wrapper
/usr/bin/gnome-terminal.wrapper - priority 40
slave x-terminal-emulator.1.gz: /usr/share/man/man1/gnome-terminal.1.gz
/usr/bin/koi8rxterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/koi8rxterm.1.gz
/usr/bin/lxterm - priority 30
slave x-terminal-emulator.1.gz: /usr/share/man/man1/lxterm.1.gz
/usr/bin/mate-terminal.wrapper - priority 30
slave x-terminal-emulator.1.gz: /usr/share/man/man1/mate-terminal.1.gz
/usr/bin/uxterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/uxterm.1.gz
/usr/bin/xterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/xterm.1.gz
Current 'best' version is '/usr/bin/gnome-terminal.wrapper'.
2
cat /etc/alternatives/x-terminal-emulator | grep exec
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:59
Is there a utility I need installed? I get eitherBinary file (standard input) matches
orupdate-alternatives: error: unknown argument
–config'`
– Terrance
Jun 23 '15 at 20:06
Nevermind, it is--config
– Terrance
Jun 23 '15 at 20:06
1
You don't needsudo
. Useupdate-alternatives --display x-terminal-emulator
– muru
Jun 23 '15 at 20:34
For the short version you might consider usingfile /etc/alternatives/x-terminal-emulator
to get the target of this symbolic link instead usingcat
on it. Thefile
utility should be installed on most systems and can be used to find the target executable.cat
on symbolic link could print any shell script or even binary file depending on the target of this link (shell script forgnome-terminal
, binary fileurxvt
, etc.).
– chris544
Jul 18 '17 at 3:40
add a comment |
The short version (thx @Serg)
cat /etc/alternatives/x-terminal-emulator
The long version
sudo update-alternatives --config x-terminal-emulator
and look for the *
in the output
;)
Example output
There are 7 alternatives which provide `x-terminal-emulator’.
Selection Alternative
———————————————–
1 /usr/bin/xterm
2 /usr/bin/uxterm
3 /usr/bin/koi8rxterm
4 /usr/bin/lxterm
*+ 5 /usr/bin/gnome-terminal.wrapper
6 /usr/bin/konsole
7 /usr/bin/xfce4-terminal.wrapper
Press enter to keep the default[*], or type selection number:
Or, thanks to @muru, here is more detailed output
$ update-alternatives --display x-terminal-emulator
x-terminal-emulator - auto mode
link currently points to /usr/bin/gnome-terminal.wrapper
/usr/bin/gnome-terminal.wrapper - priority 40
slave x-terminal-emulator.1.gz: /usr/share/man/man1/gnome-terminal.1.gz
/usr/bin/koi8rxterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/koi8rxterm.1.gz
/usr/bin/lxterm - priority 30
slave x-terminal-emulator.1.gz: /usr/share/man/man1/lxterm.1.gz
/usr/bin/mate-terminal.wrapper - priority 30
slave x-terminal-emulator.1.gz: /usr/share/man/man1/mate-terminal.1.gz
/usr/bin/uxterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/uxterm.1.gz
/usr/bin/xterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/xterm.1.gz
Current 'best' version is '/usr/bin/gnome-terminal.wrapper'.
The short version (thx @Serg)
cat /etc/alternatives/x-terminal-emulator
The long version
sudo update-alternatives --config x-terminal-emulator
and look for the *
in the output
;)
Example output
There are 7 alternatives which provide `x-terminal-emulator’.
Selection Alternative
———————————————–
1 /usr/bin/xterm
2 /usr/bin/uxterm
3 /usr/bin/koi8rxterm
4 /usr/bin/lxterm
*+ 5 /usr/bin/gnome-terminal.wrapper
6 /usr/bin/konsole
7 /usr/bin/xfce4-terminal.wrapper
Press enter to keep the default[*], or type selection number:
Or, thanks to @muru, here is more detailed output
$ update-alternatives --display x-terminal-emulator
x-terminal-emulator - auto mode
link currently points to /usr/bin/gnome-terminal.wrapper
/usr/bin/gnome-terminal.wrapper - priority 40
slave x-terminal-emulator.1.gz: /usr/share/man/man1/gnome-terminal.1.gz
/usr/bin/koi8rxterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/koi8rxterm.1.gz
/usr/bin/lxterm - priority 30
slave x-terminal-emulator.1.gz: /usr/share/man/man1/lxterm.1.gz
/usr/bin/mate-terminal.wrapper - priority 30
slave x-terminal-emulator.1.gz: /usr/share/man/man1/mate-terminal.1.gz
/usr/bin/uxterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/uxterm.1.gz
/usr/bin/xterm - priority 20
slave x-terminal-emulator.1.gz: /usr/share/man/man1/xterm.1.gz
Current 'best' version is '/usr/bin/gnome-terminal.wrapper'.
edited Oct 14 '17 at 16:03
Suncatcher
123117
123117
answered Jun 23 '15 at 19:54
A.B.A.B.
69.7k12172266
69.7k12172266
2
cat /etc/alternatives/x-terminal-emulator | grep exec
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:59
Is there a utility I need installed? I get eitherBinary file (standard input) matches
orupdate-alternatives: error: unknown argument
–config'`
– Terrance
Jun 23 '15 at 20:06
Nevermind, it is--config
– Terrance
Jun 23 '15 at 20:06
1
You don't needsudo
. Useupdate-alternatives --display x-terminal-emulator
– muru
Jun 23 '15 at 20:34
For the short version you might consider usingfile /etc/alternatives/x-terminal-emulator
to get the target of this symbolic link instead usingcat
on it. Thefile
utility should be installed on most systems and can be used to find the target executable.cat
on symbolic link could print any shell script or even binary file depending on the target of this link (shell script forgnome-terminal
, binary fileurxvt
, etc.).
– chris544
Jul 18 '17 at 3:40
add a comment |
2
cat /etc/alternatives/x-terminal-emulator | grep exec
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:59
Is there a utility I need installed? I get eitherBinary file (standard input) matches
orupdate-alternatives: error: unknown argument
–config'`
– Terrance
Jun 23 '15 at 20:06
Nevermind, it is--config
– Terrance
Jun 23 '15 at 20:06
1
You don't needsudo
. Useupdate-alternatives --display x-terminal-emulator
– muru
Jun 23 '15 at 20:34
For the short version you might consider usingfile /etc/alternatives/x-terminal-emulator
to get the target of this symbolic link instead usingcat
on it. Thefile
utility should be installed on most systems and can be used to find the target executable.cat
on symbolic link could print any shell script or even binary file depending on the target of this link (shell script forgnome-terminal
, binary fileurxvt
, etc.).
– chris544
Jul 18 '17 at 3:40
2
2
cat /etc/alternatives/x-terminal-emulator | grep exec
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:59
cat /etc/alternatives/x-terminal-emulator | grep exec
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:59
Is there a utility I need installed? I get either
Binary file (standard input) matches
or update-alternatives: error: unknown argument
–config'`– Terrance
Jun 23 '15 at 20:06
Is there a utility I need installed? I get either
Binary file (standard input) matches
or update-alternatives: error: unknown argument
–config'`– Terrance
Jun 23 '15 at 20:06
Nevermind, it is
--config
– Terrance
Jun 23 '15 at 20:06
Nevermind, it is
--config
– Terrance
Jun 23 '15 at 20:06
1
1
You don't need
sudo
. Use update-alternatives --display x-terminal-emulator
– muru
Jun 23 '15 at 20:34
You don't need
sudo
. Use update-alternatives --display x-terminal-emulator
– muru
Jun 23 '15 at 20:34
For the short version you might consider using
file /etc/alternatives/x-terminal-emulator
to get the target of this symbolic link instead using cat
on it. The file
utility should be installed on most systems and can be used to find the target executable. cat
on symbolic link could print any shell script or even binary file depending on the target of this link (shell script for gnome-terminal
, binary file urxvt
, etc.).– chris544
Jul 18 '17 at 3:40
For the short version you might consider using
file /etc/alternatives/x-terminal-emulator
to get the target of this symbolic link instead using cat
on it. The file
utility should be installed on most systems and can be used to find the target executable. cat
on symbolic link could print any shell script or even binary file depending on the target of this link (shell script for gnome-terminal
, binary file urxvt
, etc.).– chris544
Jul 18 '17 at 3:40
add a comment |
Shell vs Terminal
First thing we need to have clarified is what exactly is being asked - find out the running shell or running terminal. Often these two terms are used interchangeably, but they are different things altogether. Shell is the command-line interpreter, specifically interactive shell is the prompt plus text field where you enter commands. Shells can also be non-interactive, for example a script starts non-interactive shell, or bash -c 'echo hello world'
also starts non-interactive shell.
By contrast, terminal is the interface to shell ( though it could be another application as well). Originally terminal referred to actual hardware, but nowadays they're mostly software. What you see when you press Ctrl+Alt+t or click on the terminal icon in GUI, that starts a terminal emulator, a window which mimics behavior of hardware, and within that window you can see the shell running. Ctrl+Alt+F2 (or any of the 6 function keys) will open virtual console, aka tty
. I recommend reading Why is a virtual terminal “virtual”, and what/why/where is the “real” terminal? for more info on the specifics.
Getting the shell information
Each user has a default shell assigned to them in /etc/passwd
for their username. Assuming you are using default configuration and haven't called another shell explicitly as a command, it is sufficient to do:
echo $SHELL
But of course this only shows default value. Suppose we do the following:
user@ubuntu:~$ dash
$
We were originally in bash
, but started interactive session of /bin/dash
, Ubuntu's POSIX or system shell. The variable $SHELL
won't change, because that's not its purpose - it shows default not current value. We will need to approach this from another perspective - the perspective of a process, which is something I've covered in Am I using bash or sh?
$ echo $$
4824
$ cat /proc/4824/comm
mksh
$ bash
xieerqi@eagle:~$ echo $$
6197
xieerqi@eagle:~$ cat /proc/6197/comm
bash
Here we take advantage of /proc/
filesystem. The name of the process and command-line parameters are displayed in /proc/<pid>/comm
. All we need is to provide shell's PID, which is what $$
does. In the example above I am adding that separately, but there is nothing stopping us from doing just
cat /proc/$$/comm
Another way we could approach this is via checking where /proc/<pid>/exe
. This file is a symlink that points to the executable file.
You can also do ps aux | grep $(echo $$ )
for that same purpose.
If you want to know filename or device name which is connected to stdin. (mostly useful in tty), run tty
command
Many terminals seem to mask themselves as xterm compatible, which is reported by echo $TERM
or echo $COLORTERM
. Virtual terminals are more tricky, as you can see.
What we can do is run xprop
, click on the desired window, grep its pid, and find out what's the name of that process matching pid. Or in other words:
$ ps aux | grep $(xprop | awk -F'=' '/PID/ {print $2}')
xieerqi 2124 0.6 1.7 208068 34604 ? Sl 18:47 1:49 gnome-terminal
Or even more simply :
ps -p $(xprop | awk -F'=' '/PID/ {print $2}')
O_o$SHELL
, sure
– A.B.
Jun 23 '15 at 19:59
Eek. Why do you people useps | grep
?ps -p $$
! Or, just for the command,ps -p $$ -o cmd=
.
– muru
Jun 23 '15 at 20:36
@muru because I'm less experienced user than you are, and I don't have all the ps flags memorized >_< bluntly
– Sergiy Kolodyazhnyy
Jun 23 '15 at 20:42
2
Neither do I, butps | grep
is just bad form. Most of what you can grep, can actually be obtained byps
itself, or by other tools.
– muru
Jun 23 '15 at 20:45
add a comment |
Shell vs Terminal
First thing we need to have clarified is what exactly is being asked - find out the running shell or running terminal. Often these two terms are used interchangeably, but they are different things altogether. Shell is the command-line interpreter, specifically interactive shell is the prompt plus text field where you enter commands. Shells can also be non-interactive, for example a script starts non-interactive shell, or bash -c 'echo hello world'
also starts non-interactive shell.
By contrast, terminal is the interface to shell ( though it could be another application as well). Originally terminal referred to actual hardware, but nowadays they're mostly software. What you see when you press Ctrl+Alt+t or click on the terminal icon in GUI, that starts a terminal emulator, a window which mimics behavior of hardware, and within that window you can see the shell running. Ctrl+Alt+F2 (or any of the 6 function keys) will open virtual console, aka tty
. I recommend reading Why is a virtual terminal “virtual”, and what/why/where is the “real” terminal? for more info on the specifics.
Getting the shell information
Each user has a default shell assigned to them in /etc/passwd
for their username. Assuming you are using default configuration and haven't called another shell explicitly as a command, it is sufficient to do:
echo $SHELL
But of course this only shows default value. Suppose we do the following:
user@ubuntu:~$ dash
$
We were originally in bash
, but started interactive session of /bin/dash
, Ubuntu's POSIX or system shell. The variable $SHELL
won't change, because that's not its purpose - it shows default not current value. We will need to approach this from another perspective - the perspective of a process, which is something I've covered in Am I using bash or sh?
$ echo $$
4824
$ cat /proc/4824/comm
mksh
$ bash
xieerqi@eagle:~$ echo $$
6197
xieerqi@eagle:~$ cat /proc/6197/comm
bash
Here we take advantage of /proc/
filesystem. The name of the process and command-line parameters are displayed in /proc/<pid>/comm
. All we need is to provide shell's PID, which is what $$
does. In the example above I am adding that separately, but there is nothing stopping us from doing just
cat /proc/$$/comm
Another way we could approach this is via checking where /proc/<pid>/exe
. This file is a symlink that points to the executable file.
You can also do ps aux | grep $(echo $$ )
for that same purpose.
If you want to know filename or device name which is connected to stdin. (mostly useful in tty), run tty
command
Many terminals seem to mask themselves as xterm compatible, which is reported by echo $TERM
or echo $COLORTERM
. Virtual terminals are more tricky, as you can see.
What we can do is run xprop
, click on the desired window, grep its pid, and find out what's the name of that process matching pid. Or in other words:
$ ps aux | grep $(xprop | awk -F'=' '/PID/ {print $2}')
xieerqi 2124 0.6 1.7 208068 34604 ? Sl 18:47 1:49 gnome-terminal
Or even more simply :
ps -p $(xprop | awk -F'=' '/PID/ {print $2}')
O_o$SHELL
, sure
– A.B.
Jun 23 '15 at 19:59
Eek. Why do you people useps | grep
?ps -p $$
! Or, just for the command,ps -p $$ -o cmd=
.
– muru
Jun 23 '15 at 20:36
@muru because I'm less experienced user than you are, and I don't have all the ps flags memorized >_< bluntly
– Sergiy Kolodyazhnyy
Jun 23 '15 at 20:42
2
Neither do I, butps | grep
is just bad form. Most of what you can grep, can actually be obtained byps
itself, or by other tools.
– muru
Jun 23 '15 at 20:45
add a comment |
Shell vs Terminal
First thing we need to have clarified is what exactly is being asked - find out the running shell or running terminal. Often these two terms are used interchangeably, but they are different things altogether. Shell is the command-line interpreter, specifically interactive shell is the prompt plus text field where you enter commands. Shells can also be non-interactive, for example a script starts non-interactive shell, or bash -c 'echo hello world'
also starts non-interactive shell.
By contrast, terminal is the interface to shell ( though it could be another application as well). Originally terminal referred to actual hardware, but nowadays they're mostly software. What you see when you press Ctrl+Alt+t or click on the terminal icon in GUI, that starts a terminal emulator, a window which mimics behavior of hardware, and within that window you can see the shell running. Ctrl+Alt+F2 (or any of the 6 function keys) will open virtual console, aka tty
. I recommend reading Why is a virtual terminal “virtual”, and what/why/where is the “real” terminal? for more info on the specifics.
Getting the shell information
Each user has a default shell assigned to them in /etc/passwd
for their username. Assuming you are using default configuration and haven't called another shell explicitly as a command, it is sufficient to do:
echo $SHELL
But of course this only shows default value. Suppose we do the following:
user@ubuntu:~$ dash
$
We were originally in bash
, but started interactive session of /bin/dash
, Ubuntu's POSIX or system shell. The variable $SHELL
won't change, because that's not its purpose - it shows default not current value. We will need to approach this from another perspective - the perspective of a process, which is something I've covered in Am I using bash or sh?
$ echo $$
4824
$ cat /proc/4824/comm
mksh
$ bash
xieerqi@eagle:~$ echo $$
6197
xieerqi@eagle:~$ cat /proc/6197/comm
bash
Here we take advantage of /proc/
filesystem. The name of the process and command-line parameters are displayed in /proc/<pid>/comm
. All we need is to provide shell's PID, which is what $$
does. In the example above I am adding that separately, but there is nothing stopping us from doing just
cat /proc/$$/comm
Another way we could approach this is via checking where /proc/<pid>/exe
. This file is a symlink that points to the executable file.
You can also do ps aux | grep $(echo $$ )
for that same purpose.
If you want to know filename or device name which is connected to stdin. (mostly useful in tty), run tty
command
Many terminals seem to mask themselves as xterm compatible, which is reported by echo $TERM
or echo $COLORTERM
. Virtual terminals are more tricky, as you can see.
What we can do is run xprop
, click on the desired window, grep its pid, and find out what's the name of that process matching pid. Or in other words:
$ ps aux | grep $(xprop | awk -F'=' '/PID/ {print $2}')
xieerqi 2124 0.6 1.7 208068 34604 ? Sl 18:47 1:49 gnome-terminal
Or even more simply :
ps -p $(xprop | awk -F'=' '/PID/ {print $2}')
Shell vs Terminal
First thing we need to have clarified is what exactly is being asked - find out the running shell or running terminal. Often these two terms are used interchangeably, but they are different things altogether. Shell is the command-line interpreter, specifically interactive shell is the prompt plus text field where you enter commands. Shells can also be non-interactive, for example a script starts non-interactive shell, or bash -c 'echo hello world'
also starts non-interactive shell.
By contrast, terminal is the interface to shell ( though it could be another application as well). Originally terminal referred to actual hardware, but nowadays they're mostly software. What you see when you press Ctrl+Alt+t or click on the terminal icon in GUI, that starts a terminal emulator, a window which mimics behavior of hardware, and within that window you can see the shell running. Ctrl+Alt+F2 (or any of the 6 function keys) will open virtual console, aka tty
. I recommend reading Why is a virtual terminal “virtual”, and what/why/where is the “real” terminal? for more info on the specifics.
Getting the shell information
Each user has a default shell assigned to them in /etc/passwd
for their username. Assuming you are using default configuration and haven't called another shell explicitly as a command, it is sufficient to do:
echo $SHELL
But of course this only shows default value. Suppose we do the following:
user@ubuntu:~$ dash
$
We were originally in bash
, but started interactive session of /bin/dash
, Ubuntu's POSIX or system shell. The variable $SHELL
won't change, because that's not its purpose - it shows default not current value. We will need to approach this from another perspective - the perspective of a process, which is something I've covered in Am I using bash or sh?
$ echo $$
4824
$ cat /proc/4824/comm
mksh
$ bash
xieerqi@eagle:~$ echo $$
6197
xieerqi@eagle:~$ cat /proc/6197/comm
bash
Here we take advantage of /proc/
filesystem. The name of the process and command-line parameters are displayed in /proc/<pid>/comm
. All we need is to provide shell's PID, which is what $$
does. In the example above I am adding that separately, but there is nothing stopping us from doing just
cat /proc/$$/comm
Another way we could approach this is via checking where /proc/<pid>/exe
. This file is a symlink that points to the executable file.
You can also do ps aux | grep $(echo $$ )
for that same purpose.
If you want to know filename or device name which is connected to stdin. (mostly useful in tty), run tty
command
Many terminals seem to mask themselves as xterm compatible, which is reported by echo $TERM
or echo $COLORTERM
. Virtual terminals are more tricky, as you can see.
What we can do is run xprop
, click on the desired window, grep its pid, and find out what's the name of that process matching pid. Or in other words:
$ ps aux | grep $(xprop | awk -F'=' '/PID/ {print $2}')
xieerqi 2124 0.6 1.7 208068 34604 ? Sl 18:47 1:49 gnome-terminal
Or even more simply :
ps -p $(xprop | awk -F'=' '/PID/ {print $2}')
edited 9 mins ago
answered Jun 23 '15 at 19:55
Sergiy KolodyazhnyySergiy Kolodyazhnyy
74.9k9155326
74.9k9155326
O_o$SHELL
, sure
– A.B.
Jun 23 '15 at 19:59
Eek. Why do you people useps | grep
?ps -p $$
! Or, just for the command,ps -p $$ -o cmd=
.
– muru
Jun 23 '15 at 20:36
@muru because I'm less experienced user than you are, and I don't have all the ps flags memorized >_< bluntly
– Sergiy Kolodyazhnyy
Jun 23 '15 at 20:42
2
Neither do I, butps | grep
is just bad form. Most of what you can grep, can actually be obtained byps
itself, or by other tools.
– muru
Jun 23 '15 at 20:45
add a comment |
O_o$SHELL
, sure
– A.B.
Jun 23 '15 at 19:59
Eek. Why do you people useps | grep
?ps -p $$
! Or, just for the command,ps -p $$ -o cmd=
.
– muru
Jun 23 '15 at 20:36
@muru because I'm less experienced user than you are, and I don't have all the ps flags memorized >_< bluntly
– Sergiy Kolodyazhnyy
Jun 23 '15 at 20:42
2
Neither do I, butps | grep
is just bad form. Most of what you can grep, can actually be obtained byps
itself, or by other tools.
– muru
Jun 23 '15 at 20:45
O_o
$SHELL
, sure– A.B.
Jun 23 '15 at 19:59
O_o
$SHELL
, sure– A.B.
Jun 23 '15 at 19:59
Eek. Why do you people use
ps | grep
? ps -p $$
! Or, just for the command, ps -p $$ -o cmd=
.– muru
Jun 23 '15 at 20:36
Eek. Why do you people use
ps | grep
? ps -p $$
! Or, just for the command, ps -p $$ -o cmd=
.– muru
Jun 23 '15 at 20:36
@muru because I'm less experienced user than you are, and I don't have all the ps flags memorized >_< bluntly
– Sergiy Kolodyazhnyy
Jun 23 '15 at 20:42
@muru because I'm less experienced user than you are, and I don't have all the ps flags memorized >_< bluntly
– Sergiy Kolodyazhnyy
Jun 23 '15 at 20:42
2
2
Neither do I, but
ps | grep
is just bad form. Most of what you can grep, can actually be obtained by ps
itself, or by other tools.– muru
Jun 23 '15 at 20:45
Neither do I, but
ps | grep
is just bad form. Most of what you can grep, can actually be obtained by ps
itself, or by other tools.– muru
Jun 23 '15 at 20:45
add a comment |
If you want to know the terminal program you are using, use this:
ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
Run this just after opening the terminal (shell) without forking any further shell instance.
When you open up the terminal program, it basically spawns a child program, a shell. So the parent of the spawned shell is the terminal itself. In other words, the PPID of the shell is the PID of terminal program.
Here we are finding the parent process ID (PPID) of the shell (bash
) by ps -o 'ppid=' -p $$
, which will be the process ID of terminal program.
Then we are finding the process name from the PID:
$ ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
gnome-terminal
It is basically a one liner of:
$ ps -o 'ppid=' -p $$
2268
$ ps -o 'cmd=' -p 2268
gnome-terminal
When I run this command I getsshd: username@pts/4
. Note I'm using PuTTY to connect to the machine. Issshd
actually the terminal emulator?
– user3731622
Mar 21 '18 at 17:21
add a comment |
If you want to know the terminal program you are using, use this:
ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
Run this just after opening the terminal (shell) without forking any further shell instance.
When you open up the terminal program, it basically spawns a child program, a shell. So the parent of the spawned shell is the terminal itself. In other words, the PPID of the shell is the PID of terminal program.
Here we are finding the parent process ID (PPID) of the shell (bash
) by ps -o 'ppid=' -p $$
, which will be the process ID of terminal program.
Then we are finding the process name from the PID:
$ ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
gnome-terminal
It is basically a one liner of:
$ ps -o 'ppid=' -p $$
2268
$ ps -o 'cmd=' -p 2268
gnome-terminal
When I run this command I getsshd: username@pts/4
. Note I'm using PuTTY to connect to the machine. Issshd
actually the terminal emulator?
– user3731622
Mar 21 '18 at 17:21
add a comment |
If you want to know the terminal program you are using, use this:
ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
Run this just after opening the terminal (shell) without forking any further shell instance.
When you open up the terminal program, it basically spawns a child program, a shell. So the parent of the spawned shell is the terminal itself. In other words, the PPID of the shell is the PID of terminal program.
Here we are finding the parent process ID (PPID) of the shell (bash
) by ps -o 'ppid=' -p $$
, which will be the process ID of terminal program.
Then we are finding the process name from the PID:
$ ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
gnome-terminal
It is basically a one liner of:
$ ps -o 'ppid=' -p $$
2268
$ ps -o 'cmd=' -p 2268
gnome-terminal
If you want to know the terminal program you are using, use this:
ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
Run this just after opening the terminal (shell) without forking any further shell instance.
When you open up the terminal program, it basically spawns a child program, a shell. So the parent of the spawned shell is the terminal itself. In other words, the PPID of the shell is the PID of terminal program.
Here we are finding the parent process ID (PPID) of the shell (bash
) by ps -o 'ppid=' -p $$
, which will be the process ID of terminal program.
Then we are finding the process name from the PID:
$ ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
gnome-terminal
It is basically a one liner of:
$ ps -o 'ppid=' -p $$
2268
$ ps -o 'cmd=' -p 2268
gnome-terminal
answered Jun 23 '15 at 20:08
heemaylheemayl
67.8k11142214
67.8k11142214
When I run this command I getsshd: username@pts/4
. Note I'm using PuTTY to connect to the machine. Issshd
actually the terminal emulator?
– user3731622
Mar 21 '18 at 17:21
add a comment |
When I run this command I getsshd: username@pts/4
. Note I'm using PuTTY to connect to the machine. Issshd
actually the terminal emulator?
– user3731622
Mar 21 '18 at 17:21
When I run this command I get
sshd: username@pts/4
. Note I'm using PuTTY to connect to the machine. Is sshd
actually the terminal emulator?– user3731622
Mar 21 '18 at 17:21
When I run this command I get
sshd: username@pts/4
. Note I'm using PuTTY to connect to the machine. Is sshd
actually the terminal emulator?– user3731622
Mar 21 '18 at 17:21
add a comment |
Type in printenv
from the terminal window to view all variables of the open session.
Type in echo $COLORTERM
from the terminal window. NOTE: this does not work with all terminals, one like sakura
does not report this back.
root@terrance-Linux:~# echo $COLORTERM
gnome-terminal
the one below is from an aterm
terminal.
root@terrance-Linux:~$ echo $COLORTERM
rxvt-xpm
echo $COLORTERM in sakura reports blank
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:46
@Serg thank you. It looks like it is a variant of xterm then.
– Terrance
Jun 23 '15 at 19:48
@Serg just wondering if you like Sakura? And what draws you to it?
– Terrance
Jun 23 '15 at 19:52
It's alright, nothing quite special, quite simplistic. I've tried variety of terminal emulators: terminator, roxterm, tilde, the dropdown one (forgot what it's called, something starting with R ). I guess it is a compromise between xterm and gnome-terminal
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:57
@Serg Ah, that is good to know. I am going to check that out. :-) I am always on the look out for a good terminal that works with my keepalive script that sends xdotool keys to them.
– Terrance
Jun 23 '15 at 19:59
|
show 3 more comments
Type in printenv
from the terminal window to view all variables of the open session.
Type in echo $COLORTERM
from the terminal window. NOTE: this does not work with all terminals, one like sakura
does not report this back.
root@terrance-Linux:~# echo $COLORTERM
gnome-terminal
the one below is from an aterm
terminal.
root@terrance-Linux:~$ echo $COLORTERM
rxvt-xpm
echo $COLORTERM in sakura reports blank
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:46
@Serg thank you. It looks like it is a variant of xterm then.
– Terrance
Jun 23 '15 at 19:48
@Serg just wondering if you like Sakura? And what draws you to it?
– Terrance
Jun 23 '15 at 19:52
It's alright, nothing quite special, quite simplistic. I've tried variety of terminal emulators: terminator, roxterm, tilde, the dropdown one (forgot what it's called, something starting with R ). I guess it is a compromise between xterm and gnome-terminal
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:57
@Serg Ah, that is good to know. I am going to check that out. :-) I am always on the look out for a good terminal that works with my keepalive script that sends xdotool keys to them.
– Terrance
Jun 23 '15 at 19:59
|
show 3 more comments
Type in printenv
from the terminal window to view all variables of the open session.
Type in echo $COLORTERM
from the terminal window. NOTE: this does not work with all terminals, one like sakura
does not report this back.
root@terrance-Linux:~# echo $COLORTERM
gnome-terminal
the one below is from an aterm
terminal.
root@terrance-Linux:~$ echo $COLORTERM
rxvt-xpm
Type in printenv
from the terminal window to view all variables of the open session.
Type in echo $COLORTERM
from the terminal window. NOTE: this does not work with all terminals, one like sakura
does not report this back.
root@terrance-Linux:~# echo $COLORTERM
gnome-terminal
the one below is from an aterm
terminal.
root@terrance-Linux:~$ echo $COLORTERM
rxvt-xpm
edited Jun 23 '15 at 19:51
answered Jun 23 '15 at 19:35
TerranceTerrance
20.4k34898
20.4k34898
echo $COLORTERM in sakura reports blank
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:46
@Serg thank you. It looks like it is a variant of xterm then.
– Terrance
Jun 23 '15 at 19:48
@Serg just wondering if you like Sakura? And what draws you to it?
– Terrance
Jun 23 '15 at 19:52
It's alright, nothing quite special, quite simplistic. I've tried variety of terminal emulators: terminator, roxterm, tilde, the dropdown one (forgot what it's called, something starting with R ). I guess it is a compromise between xterm and gnome-terminal
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:57
@Serg Ah, that is good to know. I am going to check that out. :-) I am always on the look out for a good terminal that works with my keepalive script that sends xdotool keys to them.
– Terrance
Jun 23 '15 at 19:59
|
show 3 more comments
echo $COLORTERM in sakura reports blank
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:46
@Serg thank you. It looks like it is a variant of xterm then.
– Terrance
Jun 23 '15 at 19:48
@Serg just wondering if you like Sakura? And what draws you to it?
– Terrance
Jun 23 '15 at 19:52
It's alright, nothing quite special, quite simplistic. I've tried variety of terminal emulators: terminator, roxterm, tilde, the dropdown one (forgot what it's called, something starting with R ). I guess it is a compromise between xterm and gnome-terminal
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:57
@Serg Ah, that is good to know. I am going to check that out. :-) I am always on the look out for a good terminal that works with my keepalive script that sends xdotool keys to them.
– Terrance
Jun 23 '15 at 19:59
echo $COLORTERM in sakura reports blank
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:46
echo $COLORTERM in sakura reports blank
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:46
@Serg thank you. It looks like it is a variant of xterm then.
– Terrance
Jun 23 '15 at 19:48
@Serg thank you. It looks like it is a variant of xterm then.
– Terrance
Jun 23 '15 at 19:48
@Serg just wondering if you like Sakura? And what draws you to it?
– Terrance
Jun 23 '15 at 19:52
@Serg just wondering if you like Sakura? And what draws you to it?
– Terrance
Jun 23 '15 at 19:52
It's alright, nothing quite special, quite simplistic. I've tried variety of terminal emulators: terminator, roxterm, tilde, the dropdown one (forgot what it's called, something starting with R ). I guess it is a compromise between xterm and gnome-terminal
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:57
It's alright, nothing quite special, quite simplistic. I've tried variety of terminal emulators: terminator, roxterm, tilde, the dropdown one (forgot what it's called, something starting with R ). I guess it is a compromise between xterm and gnome-terminal
– Sergiy Kolodyazhnyy
Jun 23 '15 at 19:57
@Serg Ah, that is good to know. I am going to check that out. :-) I am always on the look out for a good terminal that works with my keepalive script that sends xdotool keys to them.
– Terrance
Jun 23 '15 at 19:59
@Serg Ah, that is good to know. I am going to check that out. :-) I am always on the look out for a good terminal that works with my keepalive script that sends xdotool keys to them.
– Terrance
Jun 23 '15 at 19:59
|
show 3 more comments
If you just want the name of the terminal program, you'll most probably find it under Help > About.
add a comment |
If you just want the name of the terminal program, you'll most probably find it under Help > About.
add a comment |
If you just want the name of the terminal program, you'll most probably find it under Help > About.
If you just want the name of the terminal program, you'll most probably find it under Help > About.
answered Jun 23 '15 at 20:07
thesdogthesdog
13617
13617
add a comment |
add a comment |
cat /etc/alternatives/x-terminal-emulator | grep exec
Sample output:
exec('gnome-terminal',@args);
There's the answer for my system: gnome-terminal.
So, typing gnome-terminal
into my terminal will now open up another identical terminal window.
Sources:
- Sergiy Kolodyazhnyy's comment under A.B.'s answer.
add a comment |
cat /etc/alternatives/x-terminal-emulator | grep exec
Sample output:
exec('gnome-terminal',@args);
There's the answer for my system: gnome-terminal.
So, typing gnome-terminal
into my terminal will now open up another identical terminal window.
Sources:
- Sergiy Kolodyazhnyy's comment under A.B.'s answer.
add a comment |
cat /etc/alternatives/x-terminal-emulator | grep exec
Sample output:
exec('gnome-terminal',@args);
There's the answer for my system: gnome-terminal.
So, typing gnome-terminal
into my terminal will now open up another identical terminal window.
Sources:
- Sergiy Kolodyazhnyy's comment under A.B.'s answer.
cat /etc/alternatives/x-terminal-emulator | grep exec
Sample output:
exec('gnome-terminal',@args);
There's the answer for my system: gnome-terminal.
So, typing gnome-terminal
into my terminal will now open up another identical terminal window.
Sources:
- Sergiy Kolodyazhnyy's comment under A.B.'s answer.
answered Oct 1 '18 at 23:39
Gabriel StaplesGabriel Staples
83611024
83611024
add a comment |
add a comment |
Simple answer. Works for both console or ssh.
Example for simple character terminal:
ssh username@systemname
echo $TERM
dumb
tells you that you can't open GUI apps on that connection
Example for xterm (also works with PuTTY/Xming on Windows)
ssh -Y username@systemname -- omit this if using PuTTY --
echo $TERM
xterm
means that you can use GUI commands like opening the leafpad editor or nautilus file manager.
On the console it is the same:
Open terminal window
echo $TERM
xterm
TERM
is not a variable that defines the default terminal emulator, but rather one that defines the capabilities of the current one. For example, setting the variable to "xterm-color" lets any program running in the terminal know that the current terminal is supposed to understand colours; setting it to "linux" tells programs that this is supposed to be a VT; etc.
– Cybolic
Dec 7 '17 at 0:54
add a comment |
Simple answer. Works for both console or ssh.
Example for simple character terminal:
ssh username@systemname
echo $TERM
dumb
tells you that you can't open GUI apps on that connection
Example for xterm (also works with PuTTY/Xming on Windows)
ssh -Y username@systemname -- omit this if using PuTTY --
echo $TERM
xterm
means that you can use GUI commands like opening the leafpad editor or nautilus file manager.
On the console it is the same:
Open terminal window
echo $TERM
xterm
TERM
is not a variable that defines the default terminal emulator, but rather one that defines the capabilities of the current one. For example, setting the variable to "xterm-color" lets any program running in the terminal know that the current terminal is supposed to understand colours; setting it to "linux" tells programs that this is supposed to be a VT; etc.
– Cybolic
Dec 7 '17 at 0:54
add a comment |
Simple answer. Works for both console or ssh.
Example for simple character terminal:
ssh username@systemname
echo $TERM
dumb
tells you that you can't open GUI apps on that connection
Example for xterm (also works with PuTTY/Xming on Windows)
ssh -Y username@systemname -- omit this if using PuTTY --
echo $TERM
xterm
means that you can use GUI commands like opening the leafpad editor or nautilus file manager.
On the console it is the same:
Open terminal window
echo $TERM
xterm
Simple answer. Works for both console or ssh.
Example for simple character terminal:
ssh username@systemname
echo $TERM
dumb
tells you that you can't open GUI apps on that connection
Example for xterm (also works with PuTTY/Xming on Windows)
ssh -Y username@systemname -- omit this if using PuTTY --
echo $TERM
xterm
means that you can use GUI commands like opening the leafpad editor or nautilus file manager.
On the console it is the same:
Open terminal window
echo $TERM
xterm
edited Aug 22 '17 at 21:35
answered Aug 22 '17 at 21:23
SDsolarSDsolar
1,61451938
1,61451938
TERM
is not a variable that defines the default terminal emulator, but rather one that defines the capabilities of the current one. For example, setting the variable to "xterm-color" lets any program running in the terminal know that the current terminal is supposed to understand colours; setting it to "linux" tells programs that this is supposed to be a VT; etc.
– Cybolic
Dec 7 '17 at 0:54
add a comment |
TERM
is not a variable that defines the default terminal emulator, but rather one that defines the capabilities of the current one. For example, setting the variable to "xterm-color" lets any program running in the terminal know that the current terminal is supposed to understand colours; setting it to "linux" tells programs that this is supposed to be a VT; etc.
– Cybolic
Dec 7 '17 at 0:54
TERM
is not a variable that defines the default terminal emulator, but rather one that defines the capabilities of the current one. For example, setting the variable to "xterm-color" lets any program running in the terminal know that the current terminal is supposed to understand colours; setting it to "linux" tells programs that this is supposed to be a VT; etc.– Cybolic
Dec 7 '17 at 0:54
TERM
is not a variable that defines the default terminal emulator, but rather one that defines the capabilities of the current one. For example, setting the variable to "xterm-color" lets any program running in the terminal know that the current terminal is supposed to understand colours; setting it to "linux" tells programs that this is supposed to be a VT; etc.– Cybolic
Dec 7 '17 at 0:54
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f640096%2fhow-do-i-check-which-terminal-i-am-using%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
what do you mean by which? Click Help --> About is that it?
– JoKeR
Jun 23 '15 at 19:34
3
Which terminal meaning the terminal program or the shell ?
– heemayl
Jun 23 '15 at 19:37