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

0
votes
0answers
42 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
76k 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
681 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
135 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
24 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
55 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
102 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.
26
votes
4answers
19k views

How to remove “You have mail” welcome message

When I open up my terminal it says "you have mail", anyone has any idea of why? I am running OS X, but since it too is based on Unix and relies on files such as bashrc, bash_profile etc. I thought ...
0
votes
1answer
36 views

How to run command after entering postgres

I am trying to execute ls after opening a new Guake tab and logging into postgres. guake -n guake -e 'sudo -i -u postgres && ls' The command successful opens a new tab then prompts me for ...
0
votes
1answer
26 views

How to fix my terminal prompt being out by a character? [duplicate]

My terminal prompt is set using the following configuration in my .profile file: # Prompt GREEN=$(tput setaf 2) LIME_YELLOW=$(tput setaf 190) MAGENTA=$(tput setaf 5) WHITE=$(tput setaf 7) ...
3
votes
2answers
22k views

How to exit file reading mode in linux terminal?

I appologize if its something really stupid i am asking. But this is my first day on linux commands infact I dotn have linux right now I have just installed CYGWIN for my learning. SO my question is ...
0
votes
0answers
23 views

How do I execute a command if a drive is not mounted?

I am trying to create a shell script to mount a LUKS volume if it is not already mounted. The LUKS password will be in the shell script. The shell script is being stored in a encrypted folder so it is ...
0
votes
2answers
502 views

How can I use fdisk to create a ntfs partition on /dev/sdx?

I would like to know how to create a ntfs partition on /dev/sdx. I could not figure out if I should use partition type 7 86 or 87. What is the full list of commands to use?
1
vote
1answer
49 views

How can the read/write speed of a partition or drive be measured? [duplicate]

How can I preferable from the terminal measure the read and write speeds of /dev/sdx?
-3
votes
1answer
65 views

What does root directory mean? [closed]

What does it means when they say "Move into the root directory of the kernel you wish to patch" please explain me in detail cause I'm new to this environment.
17
votes
2answers
54k views

Connect to a Bluetooth device via Terminal

I'm using Mint 15 w/ cinammon. I bought a set of bluetooth speakers and i'm tring to connect to them via terminal. Via GUI i can see them normally and i am connected to them. I want to make a small ...
13
votes
2answers
14k views

How to automatically record all your terminal sessions with script utility

What I want to achieve is be able to record my terminal sessions to file automatically whenever I use Yakuake/Konsole. It's easy to achieve if at the start of my session I do: script -f ...
2
votes
0answers
70 views

Making vim the default editor when I double click a file

When I run vim from the start menu, it opens up an xfce terminal window and runs vim. However, when I set vim to be my default text editor and double-click a file, it runs in xterm instead of the xfce ...
2
votes
1answer
55 views

Clear to end of line uses the wrong background color in screen

In ZSH prompt expansion, the command %E is supposed to "Clear to end of line." This works. We see it in the grey bar going all the way across. However, if I call "screen", the %E stops working: ...
3
votes
1answer
71 views

Clear to end of line uses the wrong background color in tmux

In ZSH prompt expansion, the command %E is supposed to "Clear to end of line." This works: However, it does not work in tmux: The issue seems to be with BCE (Background Color Erase). In screen, I ...
1
vote
1answer
26 views

Terminal based Norton Commander program

I am looking for a terminal-based file manager like the good old Norton Commander or Total Commander...but all I have found so far are graphical and hence don't run in terminal. Is there any?
2
votes
1answer
81 views

Scroll by line in terminal rather than by page Shift + PgUp

Is there a keyboard way to scroll the terminal by line the same way we scroll with mouse wheel? Shift+PgUp/PgDown give only by-page scrolling. I would like to scroll slowly as with mouse wheel. My ...
2
votes
1answer
102 views

How is sudo interrupted in xterm on Ctrl-C? [duplicate]

Please explain in detail (including tty related stuff) how is a sudo foreground process on a X terminal emulator actually killed on the Ctrl-C. See the following example please: $ sudo -u test_no_pw ...
9
votes
4answers
5k views

“Friendly” terminal color names in shell scripts?

I'm aware of libraries in languages such as Ruby and Javascript to make colorizing your terminal scripts easier by using color names like "red". But is there something like this for shell scripts in ...
3
votes
3answers
193 views

common environment variable to set dark or light terminal background

I have written a number of debuggers that all can colorize source code text shown in a terminal session. They all understand that some terminals have a dark background and some have a light background ...
1
vote
1answer
212 views

CentOS 7 Encrypt a PDF

I've recently upgraded our server from CentOS 6 to CentOS 7 and I am having issues getting pdf encryption working on it. On CentOS 6 I installed libgcj and then the pdftk package. I could then ...
7
votes
1answer
797 views

bash: no job control in this shell

I have a minimal Linux system. init is /bin/bash, only bare minimum of libraries in /lib/, /dev/ is populated statically, no daemons running (no udev, ..) When bash starts, I get following error: ...
8
votes
3answers
7k views

Effect of $LANG on terminal

I'm trying to learn how the $LANG variable behaves with gnome-terminal (and its character encoding preference option). I've been using iso8859-1 (latin1) as my main character-set and all my filenames ...
0
votes
0answers
42 views

Set a ZSH shell variable using mintty?

I have configuration files that I use to make my PS1 fancy. The design depends on the presence of a particular font. If the font isn't present, the PS1 looks ugly. I share access to a webmaster ssh ...
1
vote
1answer
36 views

running commands from files [closed]

Let's say that I write some commands in a file let's say cmake although it doesn't need to be cmake run writing some commands in a text file. example filename: cmake_command cmake ...
4
votes
2answers
69 views

Take high quality screenshots of my terminal window

I'm writing a book and sometimes I must show some screenshots taken from my terminal window. Problem is they are not good for print, so I need to increase their quality (resolution). Is there any way ...
1
vote
1answer
163 views

Using Incrond Inotify but having issues with user groups/permissions

In the /etc/incron.allow I added both: root USER_1 Then I edited the incrontab so it looks like this: /var/www/laravel/public/js/main.js IN_MODIFY yui-compressor -o ...
685
votes
5answers
160k views

What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?

I think these terms almost refer to the same thing, when used loosely: terminal shell tty console What exactly does each of these terms refer to?
32
votes
6answers
14k views

How to check if bash can print colors

I want to know if there's any way to check if my program can output terminal output using colors or not. Running commands like less and looking at the output from a program that outputs using ...
1
vote
1answer
36 views

How to write a luit command that outputs a file

I need help formatting a luit command so I can write a file that I'm trying to fix the encoding for. What I have write now is luit -encoding gbk cat santi.txt, but I would like this to have the output ...
2
votes
2answers
323 views

Detect how much of Unicode my terminal supports, even through screen

Here's the problem: I want to be able to discern if my terminal is capable of decent unicode or not, in order to use some characters or not, much like glances does, that sometimes uses colors and ...
1
vote
1answer
42 views

Remnants of previously closed file displayed in terminal

On several Unix servers, I have seen below behavior: I list all the files using ls -lrt: 3 files are being shown up I open one of the files using vi editor I close the open file Now in some Unix ...
19
votes
6answers
23k views

How can I hook on to one terminal's output from another terminal?

I need to hook onto output of currently running terminal (tty1) from virtual terminal and capture it (running X server). I'm pretty sure such a thing is possible by simpler means than debugging ...
2
votes
1answer
1k views

calling javac from CentOS 7

I want to be able to use the javac command on the CentOS 7 terminal. How do I set the PATH variable in order to accomplish this? The following explains relevant aspects of my current environment. ...
2
votes
1answer
61 views

Readline: Binding an ANSI escape sequence to a key

I would like to bind a key with bash / readline, to clear the bottom of my console screen. The ANSI sequence to clear the bottom of the screen is \e[J, so I tried to add the following line to my ...
1
vote
1answer
39 views

A command that takes a single numeric argument and prints out the day of the week based on the formula

days=('Sunday''Monday') days=('Tuesday''Wednesday') days=('Thursday''Friday') days=('Saturday') for numbers in "S@"; do if [ $numbers -ge 0 ]; then result=$(($numbers ...
1
vote
1answer
748 views

How to make vi work in single-user-mode?

When booting FreeBSD (I use 8.4-amd64) in single-user mode, mounting root filesystem in read/write mode and trying to vi some text file, I get all of this file's contents in one line. This makes vi ...
1
vote
1answer
83 views

generate new terminal (any) window from a script

I would like to run a script that detects the current terminal and generates a new terminal window, in the background, with a shell command (e.g. htop) I get the desired outcome at the command line: ...
0
votes
0answers
32 views

How work tunnel to gnome connection manager

Someone using gnome connection manager? (http://kuthulu.com/gcm/?module=home&lang=). I need setup the tunnel for connection but i don't understand how to configure, help please!
0
votes
1answer
37 views

Help with the PS and TTY?

I have this question for you guys: I execute on a different shell 'sleep 600'. I open a different terminal and I executed 'ps' to see my current process , however , I dint see any sleep process. I ...
142
votes
8answers
183k views

How to split the terminal into more than one “view”?

From vi, if you issue the command :sp, the screen splits into two "views", allowing you to edit more than one file from the same terminal. Along those same lines, is there a way to have multiple ...
8
votes
1answer
2k views

When I use zip, how can I display the overall progress without flooding the command line?

A fixed-length progress bar, a file or byte count, or better yet a timer showing the estimated time remaining would be ideal. zip's standard behavior seems to be to print a line for every file ...
19
votes
3answers
753 views

How to prevent random console output from breaking the terminal?

There are many questions on SE that show how to recover from terminal broken by cat /dev/urandom. For those that are unfamiliar with this issue - here what it is about: You execute cat /dev/urandom ...
-1
votes
2answers
47 views

Script with nested for loops [closed]

This is the code and I need to display in the terminal like this way: (1,1) (1,2) (1,3) (1,4) (1,5) (2,1) (2,2) (2,3) (2,4) (2,5) (3,1) (3,2) (3,3) (3,4) (3,5) (4,1) (4,2) (4,3) (4,4) (4,5) but ...