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
2answers
1k views

Strange Character in my Bash prompt?

I'm somewhat new to Bash prompts, but I was finally able to get things somewhat working. However, I have a strange character at the beginning of my prompt: Here's my actual PS1 prompt: ...
40
votes
3answers
18k views

How can I break away from an SSH session that has crashed?

Many times I have an SSH session that doesn't respond anymore (for example, when I lose internet connection and then reconnect). Ctrl+C, Ctrl+D, Ctrl+Z and a zillion of key presses don't have any ...
2
votes
4answers
1k views

How to prevent a program from dying when its ssh session dies?

I have a really old console application that I want to make a bit more resilient. The program is used this way: the user uses a custom terminal emulator to connect to a remote machine through ssh ...
5
votes
3answers
784 views

How to disable styling on man pages?

Is there an easy way to turn off all styling on man pages? Colors, bold, italics, everything... If not, what is an uneasy way?
3
votes
2answers
301 views

Divorced input line in GNU Screen

Is it possible to divorce my input from the overall shell using Screen? What I'm aiming for is akin to a status line that expands if I type more than would fit within a single line and is ...
4
votes
3answers
1k views

Cursor movement in terminals

I'm trying to wrap my head how shells move the screen cursor around (Moving around input the arrow keys and such). I've been doing a lot of testing, and I haven't found any system call that allows ...
0
votes
2answers
836 views

Git Server Bash and SSH

I want to use Git over SSH with my Linode VPS running Ubuntu 10.04 LTS. Instructions seem pretty easy, infact given I had already setup my SSH key etc.. All I had to do was instruct my local ...
1
vote
1answer
189 views

Different Title formats for different Terminal apps?

I use a script which either activates an already running window of a program, or starts that program if it is not running.  It uses different shortcut-keys; one for each of my most used apps — it ...
7
votes
3answers
5k views

How do I jump to the next or previous word with CTRL + arrow keys in a console?

In terminal emulation applications, pressing CTRL + Left / Right arrows jumps from one word to the previous or next one. Is it possible to have the same functionality in a Linux console, whether it is ...
4
votes
3answers
309 views

Can I insert sudo via the ^ command?

Sorry if this is a yes/no question.. I am reading this unix tutorial and found the following: Repeating and Modifying the Previous Command [..] If you mistype leavenworth as leaveworth ...
4
votes
2answers
2k views

Remapping caps-lock to escape, and menu to compose, on the linux console

When running X I use a .xmodmaprc to remap certain keys thusly: ! Make it so that both Caps Lock and Escape do Escape clear Lock keysym Caps_Lock = Escape ! Remap the menu key as Compose keysym Menu ...
2
votes
1answer
416 views

How can I program vncserver to automatically setup my shells for me?

I use VNC to connect to a hosted machine. Whenever I start a VNC server at some port and connect to it, I first need to setup my shells for me - 5 of them in a particular configuration that I like and ...
2
votes
2answers
3k views

supress error messages sent to console?

How can I suppress error messages sent to a console? On: Ubuntu? Fedora? Debian? CentOS? RedHat?
3
votes
2answers
380 views

Unix Shell and colours

Can any one please help me understand this code snippet that I found in .profile file echo -en "\e[32;44m $(hostname) \e[m";echo -e "\e[m"
2
votes
2answers
692 views

'less' width issues

I'm connecting to my Linux boxes (primarily Debian Squeeze) using Putty for Windows. Whenever I run a 'less' command, e.g. on an aptitude search, less truncates the listing to much less than my ...
5
votes
1answer
658 views

why does my emacs whitespace mode add “” to my buffer?

I'm using Putty to ssh into a RedHat box, and I'm running GNU emacs inside the putty ssh window. When I turn on whitespace-mode using M-x whitespace mode, I notice I see a "Â" before each space or ...
3
votes
2answers
3k views

change terminal title

I want to make a shell alias that starts a certain program and also changes the title of the terminal to the name of the program. How can I do that? In case it matters, I am running the terminal on ...
4
votes
1answer
685 views

Reverse control-code look up for terminals

My understanding is that terminals often use ANSI control-codes to represent non-alphanumeric character sequences. For example, when editing .inputrc for Bash in Linux, it's easy to find code ...
21
votes
6answers
10k 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 ...
0
votes
1answer
416 views

Setting a Multi-Terminal Linux Server

So Im a complete newb when it comes to enterprise level linux distros, and linux servers in general. I know my way around Most Linux Desktops, but Im going to be setting up a small Linux Server that ...
6
votes
2answers
1k views

Is it possible to transfer a running process to your terminal? [duplicate]

Possible Duplicate: How can I pause up a running process over ssh, disown it, associate it to a new screen shell and unpause it? It is fairly easy to disown a process, or make it run ...
5
votes
5answers
549 views

Would it be possible to jump between prev/next command prompts?

I'm using zsh in OS X Terminal.app and for quite a while, I've been longing for a way to jump back and forth between prev/next prompts in the terminal's output. One convenience with this would be to ...
4
votes
1answer
3k views

Terminal charset / font

I want to write a game which runs in a terminal. I do some terminal coloring and wanted to use some unicode characters for nice ascii art "graphics". But a lot of unicode characters aren't supported ...
9
votes
1answer
3k views

Make diff Use Full Terminal Width in Side-by-Side Mode

Most applications are smart about using the full width of the terminal available to them. My shell does, screen, vim, etc. However, diff in side-by-side mode (-y), does not. This angers me. It uses ...
4
votes
1answer
310 views

Why is Vim eating up Ctrl when used with Ctrl+v and how to fix it?

I'm using Vim /etc/zsh/zshrc to add key bindings for zsh because it doesn't work with inputrc. In my terminal with tmux when I type Ctrl+v then Ctrl+LeftArrow the shell will show ^[OD. However, when ...
4
votes
1answer
853 views

How do I fix unix so that I can use the arrow keys in a terminal?

Before I was able to use the Up/Down arrow keys to cycle through previous commands, but now when I press a directional key it outputs "^[[A". I'm running a bash shell. How do I fix this?
0
votes
2answers
1k views

Why curl -O -C on mac fails to download

The following script works on Ubuntu, but not on Mac. Why? How to edit it so that it would work there too? #!/bin/sh v=1.1 test_file="Test10.java" jar_file="dp4j-$v-jar-with-dependencies.jar" curl ...
9
votes
1answer
2k views

screen + vim — Any way to automatically set screen window name to open vim filename?

I have a pretty nice screen rc file that shows me the open screen windows almost like tabs at the bottom of the terminal. Currently the windows are named according to my prompt which is not so useful. ...
1
vote
2answers
715 views

Select/Paste Word-Wrap on X-Based Terminals

Is there a sure-fire method to cut & paste word-wrap on X-based terminals? That is, if I select, then paste via button-3, if the text goes to the end of the line and wraps, the paste assumes ...
17
votes
1answer
3k views

Is it possible to have vim key bindings in terminal?

I'm getting used to vim bindings (like pressing w to go to word, dw to delete a word, and such) and it's modes (insert, normal, visual), and, out of curiosity would like to know: is there some kind of ...
4
votes
2answers
3k views

Scrolling through ls output without a mouse

In some directories there are quite a few files. When I use ls the output is more than my terminal can handle. Typically I just use one of the following: ls | less ls | more depending on my mood. ...
1
vote
1answer
1k views

Restarting X in CentOS 5

I went to a CentOS terminal, and someone was logged in doing work. I hit Ctrl+Alt+F2 to try to get to my own session so I could check something. When I hit Ctrl+Alt+F1 to get back, X did not come back ...
3
votes
2answers
2k views

vim - but with scrolling, clickable text, and copy-paste

I like vim. I think touching mice is dirty. But sometimes when my hand is already on a mouse, it sure would be nice to be able to scroll the text or click a location in the text and have the cursor ...
2
votes
2answers
2k views

Dtach and Vim over Ssh: Reattach Session

I connected to my server: $ ssh me@example.com While in the server, I open a dtach session with vim: $ dtach -c \tmp\my-dtach-session-pipe vim Then my ssh session dies. I attempt to go back to ...
7
votes
2answers
2k views

Can I set my local machine's terminal colors to use those of the machine I ssh into?

I have a color scheme that I like for when I'm in a terminal, but I ssh into the machine I work on from multiple sources (locally, PuTTY, my netbook, etc.) and I want to maintain the same color scheme ...
6
votes
1answer
3k views

rxvt and Inconsolata (a font)

Is it possible to use the rxvt terminal emulator with Inconsolata? Is it possible to use any TrueType fonts with rxvt? I'd like to use rxvt but would love to use my own fonts.
5
votes
1answer
1k views

Disabling line wrap in Konsole

Is there a way to prevent konsole from wrapping lines? It would be great if I could do it without disabling any of the other features like extended colors and other of the fancier things.
4
votes
3answers
895 views

How to get output from a remote shell

I have an application running on a server, started from the command line. From time to time, I need to connect to the server via SSH and get the output messages written to stdout from the application. ...
4
votes
4answers
2k views

Copy text from one terminal into another

I am logged into ssh to a university account from my home computer. Then I find a file that I want to copy onto my local system. So I open a new shell terminal and am about to use scp to copy that ...
4
votes
2answers
1k views

What is the MIME equivalent of uuencode for sendmail?

e.g., I've got files I want to send by sendmail but the receiving mailbox (for posting pictures to my blog) will not accept uuencode files a la $uuencode file | sendmail user@domain I'm guessing ...
6
votes
1answer
3k views

Why don't Page U/Down, Home/End work in less on Solaris over ssh from Ubuntu?

I need to work on a Solaris server over ssh from my Ubuntu (Lucid) laptop. I got Home/End Insert/Delete Page Up/Down working in csh and bash using bindkey and ~/.inputrc, respectively. But I can't ...
2
votes
0answers
320 views

How can I check which shell I am currently using? [duplicate]

Possible Duplicate: How to test what shell I am using in a terminal? An echo $SHELL will only display the value of the SHELL variable which would indicate the default shell on the system. ...
5
votes
1answer
622 views

How to use the ul command line utility

I wanted to answer http://unix.stackexchange.com/questions/3043/use-roff-to-underline-words with "just use ul, this command is meant specifically for underlining text", however I just can't grasp how ...
5
votes
1answer
4k views

What is the Linux equivalent of the Windows registry?

I have a DVD+-RW drive that has quit working. Apparently many users of this laptop model experience the same problem under windows and are required to edit the registry to correct the problem. So ...
4
votes
2answers
143 views

Best way to handle lots of mail on server?

Due to some bad cron jobs I now have ~1600 mail messages, most of them containing the same error log. I would like to quickly group them by subject and delete them, while limiting the chances of ...
3
votes
2answers
963 views

closing unused gnome terminals

while working I start lots of gnome-terminals and do something with them. dd on first terminal, 12 ssh sessions to a bunch of servers to do something. These sessions are finishing it's job and get ...
2
votes
4answers
2k views

Identifying files with special characters in its name in a terminal

Something strange happened today. I was connected to an HP server with putty, and saw two files with exact same name: -rw-r--r-- 1 hemantj 3368 Apr 1 12:47 test -rw-r--r-- 1 ...
2
votes
1answer
1k views

What encoding does my Konsole support?

How can I check what encoding (ASCII, UTF-8, UTF-16 etc) my Terminal uses? It shouldn't matter, but I am using Konsole on KDE3.5.
5
votes
2answers
1k views

dash compatibility to bash

Wikipedia says that dash executes faster than bash. My question is, if I set /bin/sh to dash, will all scripts that use /bin/sh in their shebang line that was intended for bash work under dash?
12
votes
2answers
1k views

Clearing GNU Screen after full-screen application

When working at a normal xterm (not sure about a "real" terminal), when a full-screen program such as man or vim is closed, it disappears, leaving your screen so you can see your prompt, and previous ...