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
1answer
30 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
23 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) ...
33
votes
5answers
32k views

How to scroll in a terminal using keyboard?

How can I scroll in bash using only the keyboard? If it's not possible in bash, are there any other shells that support this?
2
votes
2answers
16k 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
21 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
66 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
38 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
60 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.
15
votes
2answers
44k 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 ...
1
vote
1answer
56 views

How do I get a service on a remote CentOS 7 server to persist after I log out?

I am experimenting with running Spring Boot apps on a remote CentOS 7 web server which has been successfully serving up apps on Apache and a stand-alone tomcat instance since day one. However, when I ...
11
votes
2answers
12k 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
31 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
34 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
47 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
15 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
68 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
44 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 ...
3
votes
0answers
185 views

Can't exit i3 because no sensible terminal emulator is installed

I am trying to setup Arch Linux, and after getting the most basic stuff setup I installed and ran i3 with: pacman -S i3 dmenu xorg xorg-xinit startx It finally started, but I can't exit it. After ...
9
votes
4answers
4k 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
101 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
73 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
221 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: ...
2
votes
5answers
12k views

Arch Linux terminal not starting

I just installed Arch Linux following a video tutorial from youtube for the first time. However, when I try starting the GNOME terminal it won't start. It will say Terminal at the top of my screen for ...
4
votes
0answers
136 views

How can I pass function keys to htop in a tty?

I'm trying to use htop in tty1. However, some of the function keys don't appear to work as normal. F1 and F2 do nothing, and F3 seems to trigger setup (which should normally be triggered by F2). In ...
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
26 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
33 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
58 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
124 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 ...
646
votes
5answers
148k 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?
29
votes
6answers
12k 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
29 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
247 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 ...
16
votes
6answers
18k 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
825 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
32 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
32 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 ...
2
votes
1answer
629 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
49 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
12 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
17 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 ...
123
votes
8answers
161k 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 ...
5
votes
1answer
1k 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
684 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
43 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 ...
6
votes
3answers
295 views

Silent GnuPG password request with bash commands

I'm trying to hide the "output" of a gnupg command, but it seems that it is always printed. the command is: echo "thisprogramwørks" | gpg -q --status-fd 1 --no-use-agent --sign --local-user D30BDF86 ...
13
votes
2answers
852 views

What terminal emulators support tmux control mode?

tmux has its control mode, activated with -CC, to allow the terminal emulator to control tmux. iTerm2 uses this to great effect for allowing tmux windows to appear as separate iTerm windows. Are ...
0
votes
0answers
30 views

Open remote BMC console and interact

I have a server running CentOS I will address as the master. I have been reading several solutions for different scenarios. However, I'm still having trouble grasping the idea of what is required to ...
0
votes
1answer
38 views

Bash file is unable to execute on linux terminal: Socket Programming

I have written some codes for socket programming namely socket and plug. To execute them together I am trying to use the below bash file but I get the following errors. I did execute the command ...