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

12
votes
1answer
974 views

Ctrl-C does not work with pppd non-detached session

I have a Mini2440 ARM Board, and I have put a base Debian 6.0 system on it using multistrap. I have used tmux to run several processes in defferent windows from /etc/rc.local. I connect to the board ...
14
votes
3answers
3k views

Which terminal type am I using?

I have tested this with both Ubuntu 12.04 and Debian 7. When I do echo $TERM I get xterm But if I use the dropdown menu "help" > "about" then it says gnome terminal 3.4.1.1. Does this mean I am ...
4
votes
1answer
144 views

Keeping sudo authentication with gnome-terminal (zsh)

Can sudo sessions be shared across tabs of gnome-terminal, so that once I use sudo in one tab, I won't have to re-enter my password every time I open another tab and use sudo?
2
votes
2answers
853 views

bash PS1 256 colors with bold

I want to list all colors that I can use in bash console. And after it I want to set my prompt to be bold and orange like color. I'm using this to do listing color codes for me: for code in {0..255}; ...
2
votes
1answer
62 views

Getting IO privileges in Linux

I have installed flashrom software. When i try to run sudo flashrom command it gives me "Could not get I/O privileges (Operation not permitted). You need to be root" error. Also I tried su command to ...
5
votes
1answer
588 views

What's the right value of $TERM for emacs' ansi-term, especially if 'eterm-color' isn't available after SSH?

I'm currently setting $TERM to xterm-256color: if [[ -n "$EMACS" ]]; then export TERM=xterm-256color alias emacs="emacsclient --no-wait" export EDITOR="emacsclient --no-wait" export ...
5
votes
1answer
296 views

A program that runs in a shell (e.g. pine) vs. a shell script

Having a bit of trouble finding the answer to my question, perhaps because I may be asking the wrong question. I understand bash scripts. I write them all the time to do little helpful things ...
0
votes
1answer
324 views

List of 'if' switches anywhere? [closed]

Is there a list of all the if switches for use in bash scripting? Sometimes I see someone using it and I wonder what the switch they're using actually does. Example is the -z in this one. I know how ...
1
vote
1answer
74 views

Scrot command - how to save only thumbnail

I'm using scrot to take screenshots from terminal. However when I want to generate thumbnailed version using parameter -t, I got two files: screenshot.png and screenshot-thumbnail.png. How can I ...
3
votes
2answers
343 views

Ruby update not working using two methods

I tried to install ruby version 1.9.3 with this on my mac 10.6.8: $ \curl -L https://get.rvm.io | bash -s stable --ruby Oskar-Niburskis-MacBook-Pro:~ oskarniburski$ rvm install ruby-1.9.3-p362 ...
17
votes
4answers
8k views

Removing control chars (including console codes / colours) from script output

I can use the "script" command to record an interactive session at the command line. However, this includes all control characters and colour codes. I can remove control characters (like backspace) ...
9
votes
2answers
13k views

List all connected SSH sessions?

I just SSH'd into root, and then SSH'd again into root on the same machine. So I have two windows open both SSH'd into root on my remote machine. From the shell, how can I see a list of these two ...
2
votes
1answer
699 views

Bash Commands not working on Mac

Hello I open my terminal window on Mac Os 10.6.8 as I am trying to update my ruby to 1.9.3 and the terminal gives me this response immediately as I open it: -bash: export: ...
6
votes
3answers
461 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
0answers
111 views

“Overlay” a shell prompt on top of a terminal session? [closed]

I have several CLI application ideas that would be nice to run as an "overlay" on top of my terminal session. In other words I would like to superimpose a box containing a real live shell prompt on ...
4
votes
2answers
551 views

Capturing Screenshot of terminal application via shell script?

Problem Run iftop for 5 seconds, capture the screenshot and save it to a file. iftop is a beautiful program for visualizing network traffic, but it doesn't have a batch mode where I can run it for ...
0
votes
2answers
218 views

Commands pasted into terminal are truncated

I have a list of commands I would like to paste into the terminal so that they run one after the other. Initially they run fine, but commands later on are being truncated. Example command: ogr2ogr ...
1
vote
3answers
243 views

How do I pause the output of minicom?

What is the key combination to pause/freeze the output of minicom? At times the output scrolls very quickly and it makes it difficult to analyse some event. I know I could instead capture to a file ...
7
votes
1answer
562 views

Raspberry Pi, serial console, minicom, and gnome-terminal

I'm trying to access my raspberry pi via its serial console on the gpio pins. It's working fine through a USB-3.3v serial dongle. However, there's a problem with long lines and long screens not ...
9
votes
4answers
680 views

Terminal - copy from CLI without using mouse

While firing commands in CLI, I want to copy the command I just fired or anything I wrote in terminal and paste it somewhere else without using mouse. Like in following picture, I want to copy the ...
0
votes
2answers
11k views

Yum update error: Could not retrieve mirrorlist

I'm trying to do yum update. This is the error I'm getting. sudo yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Could not retrieve mirrorlist ...
0
votes
2answers
66 views

How do I copy and paste seperately? [closed]

I know for the cp command you have to specify the source(s) and destination. But what if I have to copy say all folders under src folder, do some other operations, and then paste later on? In short, ...
0
votes
0answers
174 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
233 views

Difference between the sshd open & close entries in /var/log/secure and the log in & out entries in /var/log/wtmp

I have been trying to write a program to execute many commands during one ssh connection. My current way is (1) create SSH connection; (2) create SSH command tunnel/channel whenever needed; (3) ...
2
votes
1answer
604 views

Double line box_drawing characters in terminal

This piece of code in wikipedia: $ char=( 6a 6b 6c 6d 6e 71 74 75 76 77 78 ) $ for i in ${char[*]}; do printf "0x$i \x$i \e(0\x$i\e(B\n"; done includes one-line box-drawing characters. Are there ...
5
votes
1answer
224 views

In Bash Vi mode, I get thrown into Insert mode automatically after one key press

I am using the bash shell with the XFCE4 terminal. I have configured the shell so that it is in Vi mode. I have done this by adding the following line in my ~/.bashrc file: set -o vi When in a ...
1
vote
4answers
209 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
3
votes
1answer
148 views

zsh and COLUMNS

I cannot understand the behavior of the $COLUMNS variable under zsh. Here's an example of the sort of behavior I'm referring to. The script $HOME/cols.sh is the following: echo "COLUMNS=$COLUMNS" ...
2
votes
1answer
249 views

How to keep the terminal cursor fixed at the top?

When writing in command line I have this aversion to scrolling my eyes down to the bottom of the page as I write commands. How do I keep the cursor/line at the top and allow the output to be ...
1
vote
1answer
687 views

The command ` ls -ltu ` fails to list folders/files based on last accessed time

First on your linux desktop create 2 folders. a b Now run this in the terminal ls -ltu the result is drwxr-xr-x 2 root root 4096 Aug 30 20:33 b drwxr-xr-x 2 root root 4096 Aug 30 20:33 a ...
12
votes
4answers
3k views

Converting colored output into html

There are tools providing coloured output: dwdiff -c File1 File2 # word level diff grep --color=always # we all know this guy ... The question is: How to convert their colored output of arbitrary ...
2
votes
2answers
132 views

Looking for a GUI application to enter linux commands

I am looking for a GUI console where I can enter Linux commands in an entry widget and the result will be output in a text area widget. Is there is such software available? Something like this: In ...
4
votes
3answers
945 views

Get vertical cursor position

This might sound pretty weird, but I know how to set the vertical cursor position in Bash like this: echo -e "\e[12H" This moves the cursor to the 12th line (starting with 1). So how do I get the ...
4
votes
5answers
298 views

Only output most recent 10 (or n) lines of a lengthy command output

I have currently worked alot with shell and bash on linux. I have made tons of backups scripts and much more. In many cases I have a command that outputs thousands of lines. I actually need these ...
2
votes
3answers
161 views

Is running GUI apps on server a security issue?

To edit system files for example /etc/named/named.conf, I use: su - Password: gedit And then opens and edit above like files, instead of: nano /etc/named/named.conf or: vi ...
5
votes
2answers
678 views

How to see password as we type it

In debian wheezy terminal i type su - It ask for password, which i type but it dont show anything as Password: I want to it to show at least some asterisks as the placeholder for the password ...
1
vote
1answer
82 views

Terminal application erased from Ubuntu 13

I had a bit of rough time with Ubuntu yesterday when the home screen went blank and no program icons or sidebars were visible. Today after recovering from it and saving the essential data, I have ...
2
votes
1answer
124 views

Emacs Key-binding and the TERM variable

I changed the value of TERM to screen-256color from xterm and it effects the key-bindings in Emacs. Mainly the bindings that use the arrow keys now inserts A,B,C,D instead of running backward-word and ...
4
votes
2answers
252 views

Shells in tabbed windows in a terminal

I want to do tabbed terminal stuff without having actual tab windows in my terminal application. Is there any good way to do this within bash? It would come in very handy with SSH if I could avoid ...
2
votes
2answers
271 views

Cursor keys in bash in dtterm don't work as expected

I am trying to remap some of my keyboard shortcuts in bash. The problem is that when I try to display key code using Ctrl-V, not all keys work. For example, Typing Ctrl-V, then Home moves the terminal ...
4
votes
1answer
275 views

Send stdin to console and compressed file

I'm running a propietary program which generates text output. Kind of like a logger. logger I'd like to both view this output on the terminal to watch the server breathe, and send it to a text ...
2
votes
1answer
128 views

Why has the ANSI 3.64 standard been withdrawn?

From the Wikipedia "ANSI escape code" article: The name "ANSI escape sequence" dates from 1981 when ANSI adopted ECMA-48 as the standard ANSI X3.64 (and later, in 1997, withdrew it). Does ...
3
votes
1answer
1k views

Confused about Debian error message from su

On Raspbian, the Debian distro aimed at RPi, I end up getting the following error: $ sudo su -l root -c /bin/bash bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no ...
2
votes
1answer
4k views

Change the number of rows and columns in the TTY [duplicate]

I want to resize the terminal which comes up when you press CtrlAltF1 (or F2,F3,...). 25x80 is small for a 24" screen. Tried using stty, but the commands stty columns 200 and stty rows 50 does not ...
0
votes
0answers
69 views

Root has no permission on virtual console screen devices

Even being root I can't do the following: # cat /dev/vcs1 cat: /dev/vcs1: Operation not permitted And the rights are set correctly: # ls -o /dev/ crw-r--r-- 1 root 7, 1 Aug 5 22:00 vcs1 ...
0
votes
2answers
79 views

getting a gui program to start on boot

I have a C program I wrote for debian on the raspberry pi that asks the user to enter a number, 1-4 which it then stores in a configuration file. This only happens if the configuration file is ...
7
votes
2answers
10k views

How to mount removable media in /media/<LABEL> automatically when inserted, without any desktop environment?

I have a Debian sid system (Wheezy) (and same for arch), without any desktop environment (and no Xorg at all). I can mount my SD-cards, USB sticks, external HDD by label into a specified directory in ...
1
vote
3answers
219 views

how to make search a text on the terminal directly

I have a program that outputs some data to the terminal (via printf() ). Is it possible search a text on the outputed text on the terminal directly? It is possible to do search by directing the ...
2
votes
2answers
1k views

Get list of all files by mask in terminal

I want to find all *.h,*.cpp files in folders with defined mask, like */trunk/src*. So, I can find separately *.h and *.cpp files: find . -path "*/trunk/src/*.h" find . -path "*/trunk/src/*.cpp" ...
9
votes
5answers
20k views

Using the system date / time in a Cron Script

I'm setting up a Cronjob that will backup a MySQL database I have in my server, but I don't want it to keep overwriting the same file over and over again. Instead, I want to have an array of backups ...