A terminal is an environment for text input/output. Inside the terminal, one runs command-line and text mode programs (including shells).

learn more… | top users | synonyms

4
votes
1answer
105 views

Origin of /etc/termcap linux entry

Why is there a type of $TERM called linux described in /etc/termcap? Why and when was it created and what's the point of it? Couldn't we just stay with vt-generic? Is linux just a customary name and a ...
3
votes
4answers
698 views

How can I turn the behavior of `gedit something & disown` into the default behavior when calling gedit from the command line?

When I gedit files from the command line, it's always locking the terminal, and I'm tired of explicitly commanding a detached process for it. I tried to alias gedit as something like gedit $* & ...
17
votes
5answers
14k views

Is there a way to lock command line?

For example, in X session, I can use Ctrl-Alt-L to lock the screen, so it would ask for password to unlock and prevent somebody from messing with mine computer. But if I have an open terminal session ...
1
vote
0answers
45 views

Running screen inside tmux

I need to run an instance of screen inside tmux because there's a script I need to run that uses a complex .screenrc to run several commands in parallel and monitor them. This works on some of my ...
2
votes
1answer
212 views

Bind C-i and TAB keys to different commands in terminal applications via .inputrc

For what I have tried, "TAB" and "C-i" in .inputrc seems to mean the same thing, whatever I bind to one is bound to the other. I know that originally, it was the same thing and that this behavior is ...
1
vote
1answer
57 views

script Multiple Commands

I have a PHP script I'm running from Cron. I want to save its output to file, but also want to save the shell output to a different file. Ideally, I'd like to have this in one line. As such, I tried ...
6
votes
3answers
1k views

Why does Ctrl+Arrow make my terminal switch to a strange mode?

When i type Ctrl+Left or Ctrl+Right within Guake or gnome-terminal the last one's behaviour turns to a some kind of non-usual mode: - key acts like arrow up and + like arrow down, v runs Nano, etc. ...
1
vote
1answer
35 views

How to copy text of virtual terminal from graphics mode?

Linux have virtual terminals, one can switch between them with chvt 1, chvt 7 commands. Former is in the text mode, later is in the graphics mode. I want to copy all the text from first terminal, ...
3
votes
2answers
502 views

Which process is occupying a certain pseudo terminal pts/X?

On Linux: Normally pseudo terminals are allocated one after the other. Today I realized that even after a reboot of my laptop the first opened terminal window (which was always pts/0 earlier) ...
3
votes
1answer
64 views

How to erase unicode symbols in terminal?

Some symbols take up two character cells. Consider this script: #!/usr/bin/env bash echo '银^Htest' echo 'а^Htest' Output: test test How do I know their code points of fullwidth symbols? Some ...
0
votes
3answers
79 views

Make curl/cat not scroll down when given long text?

I have made a program where I read the text from a url using curl. The problem is that when given texts that are larger than the terminal window, it automatically scrolls down to the bottom, I want to ...
3
votes
1answer
35 views

How to scroll while Holding Shift to copy in tmux?

I have Mouse mode set to on in Tmux so that I can make use of the scroll wheel using set-window-option -g mode-mouse on. However if I want to copy the output of a particular command which spans more ...
1
vote
1answer
161 views

Change default terminal emulator on Debian

I'm trying to change my terminal emulator from xterm to eterm on Debian Jessie. I can't seem to find the tty config files. I've ran: sudo find / -name tty*.conf but that doesn't yield any results. ...
3
votes
1answer
69 views

Is it possible to save the output of a previous command on file?

Quite often, I'm in the following situation: I launch a command on bash (that takes lot of time to be processes) and I get a long output, which doesn't fit into the terminal and it can't be read ...
6
votes
4answers
352 views

is there a pastebin service that supports terminal escape sequences?

Is there a pastebin service that supports colors? I understand some of them have syntax hilighting, but I'd like to do arbitrary coloring, preferably using the terminal escape sequences. Example, i'd ...
5
votes
1answer
1k views

A script's background process is still alive after closing the terminal

This is more of a process management/signal handling question than a Bash question. It just uses Bash to explain the issue. I'm running a Bash script in which I run a background process. This is the ...
20
votes
4answers
5k views

What happens to the output of a process that has been disowned and lost its terminal?

If I close the virtual terminal, where some process was started, does the output just go straight to /dev/null, or can it pollute memory somehow? Can I anyhow grab the output to continue reading it at ...
1
vote
0answers
38 views

How to switch to another screen to run git commands while resolving conflicts (blocking command)?

Often times, I work out of a single shell when I run git commands. For example, I will start a merge: $ git merge origin/master If during this merge there are conflicts, git will "block" the shell ...
3
votes
2answers
126 views

How do I run a command in a new terminal window in the same process as the original?

What is the equivalent of xfce4-terminal -e bash -c 'myCommand' that doesn't start a new process with the terminal, but that still opens a new terminal window for the output (which will also need to ...
111
votes
8answers
59k views

How can I disown a running process and associate it to a new screen shell?

I have a running program on a SSH shell. I want to pause it and be able to unpause its execution when I come back. One way I thought of doing that was to transfer its ownership to a screen shell, ...
5
votes
1answer
59 views

Ctrl+c and Ctrl+z to interrupt/suspend jobs

To kill a hanging job, I use Ctrl+c, to send an interrupt signal to the hanging job. Sometimes this wouldn't stop the job, at least not immediately. I can then use Ctrl+z to suspend the job and then ...
2
votes
4answers
644 views

How to change color of a character while tailing and tr

I regularly use this command line but I would like to change the color of the "|" to green in the output. Does anyone know how I can accomplish this? tail -f file.log | tr '\001' '|' | grep TEST
0
votes
1answer
25 views

tmux detach session remote

I run at first terminal tmux, then I run another terminal with tmux and attach to session which I run at first terminal. First is smaller than second and I can't go to it to do something. How to ...
3
votes
1answer
41 views

Where are characters typed into a terminal saved?

Using xterm and bash 4.3 from the (pseudo-)terminal pts/10 we type (█ is the cursor): test@debian:~$ ps PID TTY TIME CMD 13128 pts/10 00:00:02 bash 21037 pts/10 00:00:00 ps ...
0
votes
2answers
28 views

Launch top command showing all cores immediately

I know that once you run top if you press [1] you can see the load on each processor (let's forget the multi-threading issue) and if you press [s] you can configure the refresh time. How can I put ...
8
votes
3answers
3k views

command line method or programmatically add ssh key to github.com user account

Is there a way to identify with a username and password to github.com servers for the purpose of adding an ssh key to the github user account? So far everything I've read suggests that a user's ssh ...
0
votes
0answers
29 views

Is “<command> &” same as demonizing a process in Linux? [duplicate]

We all know that any command succeeded by ampersand (&) makes it run in the background. Can we use it instead of demonizing tools? For example: In order to run nodejs server, we use use packages ...
3
votes
2answers
78 views

How can I type a command to execute when the current command completes?

I have a function (not) that displays a notification. Hence, I can use it to show when a command is complete. sleep 5; not However, sometimes I forget to add ;not. In OS X's terminal (a few years ...
-1
votes
1answer
20 views

Lock a Application Through Terminal

I was wondering if it were possible to lock a Application through Mac Terminal. I know there's a way to lock files, using chmod a+x 000 'directory', but it never worked with an Application. What I ...
3
votes
2answers
130 views

What are the keyboard shortcuts for the command-line?

I'm talking about the keyboard shortcuts that you use in command-line/terminal. Example: Ctrl+c that kills the process, Ctrl+d that logout, Ctrl+z that send process to background... etc. I've tested ...
1
vote
0answers
225 views

Error “dircolors: no SHELL environment variable, and no shell type option given”

Running Linux Mint 17.3 Cinnamon A while ago a created a script that changed the colors in the Terminal (to match a tutorial I was following) However if I open the terminal on another account, I get ...
23
votes
2answers
8k views

How do I start all shell sessions in a directory other than $HOME?

When I open my non-login shell in Ubuntu, my present working directory is /home/user_name (my $HOME environment variable), but I want to change this such that when I start my terminal I am in some ...
4
votes
1answer
586 views

Logging interactive input and output without capturing all typed input and control characters

I am trying to log output from an interactive command-line program; units, specifically. I have tried using tee like this: units | tee units.log or script like this: script -c units units.log ...
0
votes
0answers
60 views

Run mate-terminal on startup as root without password

I am using Linux Mint 17. I want to run mate-terminal on startup as root without need to type password (I want it to perform automatically) and execute python script in it without closing terminal ...
15
votes
3answers
26k views

Backspace, Tab not working in terminal (using ssh)

When I ssh into another machine with Debian with my account(with sudo permissions), my backspace key generates some awkward symbols on pressing. Also Tab & del keys don't work too. On the other ...
0
votes
2answers
124 views

Terminal vs Terminal emulator [duplicate]

I am trying to clarify my understanding of terminal here. Terminal is actually a device (keyboard+monitor). When in CLI mode, the input from your keyboard goes directly to shell and also displayed on ...
1
vote
1answer
67 views

How can I use the host's keyboard for a 'remote' SSH session from a tablet computer?

The perhaps slightly odd requirement is this: I have a computer/laptop running Ubuntu I have an iPad from which I can SSH into said laptop sitting right next to it I'd like to use the iPad as an ...
1
vote
1answer
47 views

shell command cd !$ [duplicate]

I looked at this question and googled, but can't find a definitive answer. What does !$ do when typed into terminal? I typed mkdir /path/to/dir cd !$ Which brought me to /path/to/dir but I still ...
9
votes
2answers
10k views

Execute command in remote active terminal

Suppose you have a terminal emulator (T1) open with a PID of 6350. From another terminal, type this command (C1): echo "ls\n" > /proc/6350/fd/0 This writes ls and the new line in T1 but does ...
1
vote
1answer
259 views

Where are gnome-terminal profiles stored on a linux distribution?

Of the distributions of Linux I have used (Red Hat, Ubuntu, CentOS, others) which utilize gnome-termial you are able to set different terminal profiles via a drop down menu located in the terminal ...
1
vote
2answers
905 views

Mac OS X: Terminal Prompt Username

I'm using Mac OS Snow Leopard (v10.6.8). I've changed the account name under System Preferences > System > Accounts > Full Name. However, that does not change the username on the terminal ...
1
vote
1answer
21 views

Change the current directory when a terminal is opened

Always which I opened the terminal, on the Linux Mint, the directories which the terminal started is: /home/user. How I changed this default directory to another, e.g. /home/user/Download?
0
votes
0answers
41 views

how to program the terminal emulator so it can trigger actions based on action keys

I want to see what happens when for example I press ctrl + alt + t on terminal. I want to view some logs for it and want to reprogram the behavior for it so when pressing ctrl + alt + t it not only ...
51
votes
4answers
74k views

How to recover a 'lost' screen session?

Somehow I managed to close a screen window without screen 'noticing' it, so the session is still flagged as attached. This prevents me from re-attaching to this session. What can I do? ...
2
votes
3answers
4k views

Sublime command line open it twice

I just created a symbolic link to sublime: $ sudo ln -s /opt/SublimeText2/sublime_text /usr/bin/subl The problem is that it opens the last project and the open I want: $ subl my-project or $ ...
1
vote
3answers
522 views

How to display size “human-readable” in lsof | grep /var* [duplicate]

I am currently trying to see , all the files which are using /var mount. With lsof | grep /var* when Its displaying size in bytes. How can I display file size in MB. Thank you.
2
votes
2answers
109 views

Understanding Return, Enter, and stty icrlf

In Ubuntu/gnome-terminal, if I run: $ stty -icrnl Then launch the GHC interactive environment (a Haskell console): $ ghci Then pressing Return does not submit the line; however, Enter does. ...
3
votes
1answer
22 views

command-click git commit ID in Terminal, and be taken to that commit in github?

I'm running a Mac and use iTerm with ZSH as my shell. Currently I can command-click (⌘+click) on links or directories in my iTerm window, and that directory or web link will open. Is there a way ...
0
votes
1answer
45 views

control-w (delete word) deletes whole line in MariaDB client

I've been using the original MySQL client for "eons" and I'm rather accustomed to using bash-like shortcuts in it. One of my more frequently used ones is to use control-w to delete the word before the ...
1
vote
1answer
84 views

How can mouse support be enabled in terminal Emacs?

How can mouse support be enabled in an Emacs terminal session started with emacs -nw? Is there a keyboard shortcut or a flag to do this? If not how can it be done in terminal emulators? I use Guake.