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

10
votes
3answers
24k views

How to append multiple lines to a file with bash

I am writing a bash script to look for a file if it doesn't exist then create it and append this to it: Host localhost ForwardAgent yes So "line then new line 'tab' then text" I think its a ...
3
votes
2answers
283 views

Terminal-based (non GUI) virtual-computer program?

Are there any terminal-based (ie. non-GUI) virtual-computer programs out there? I've been using programs like VirtualBox and QEMU, but they're obviously GUI-based... I was hoping for a virtual PC ...
2
votes
1answer
152 views

Is it possible to get a character at terminal cursor using ANSI escape codes?

I know I can move the cursor with the escape codes, and I can also print at the cursor. What I'd like to know is if it is possible to pull the character under the cursor. I tried searching for such a ...
6
votes
3answers
2k views

Where do I find a list of terminal key codes to remap shortcuts in bash?

For example: "\e[1;5C" "\e[Z" "\e-1\C-i" I only know bits and pieces, like \e stands for escape and C- for Ctrl, but what are these numbers (1) and letters (Z)? What are the ;, [ and - signs for? ...
2
votes
2answers
2k views

What does the tilde (~) mean at the end of a filename? [duplicate]

What is the file with the ~ at the end of the filename for? $ ls # aliased to add flags -rwxrwxr-x 1 durrantm 2741 May 16 09:28 strip_out_rspec_prep_cmds.sh~* drwxrwxr-x 13 durrantm 4096 May 16 ...
0
votes
2answers
109 views

Emacs “jump to class definition” functionality?

I want to jump to a class file "A" from another file "B" which defines objects "A". In eclipse, it is done using F3. Is there a way to achieve this in emacs?
5
votes
1answer
679 views

Start a song from a specific time in rhythmbox using command line

I would like to start a song from my terminal, starting from the first minute. i.e.: the command will run the music.mp3 starting from the minute 1. I am able to run a music with rhythmbox ...
7
votes
1answer
249 views

“w | tail” chops text at right margin (78 characters)

Summary: w | tail chops rows after 78th column. When I run the "w" command, it works as expected. However, when I pipe the output to "tail", it chops the output to 78 columns wide (truncates anything ...
2
votes
1answer
357 views

Separate STDOUT noise from ncurses

I am trying to run an ncurses GUI application on an ARM board. I am running it using the serial console ttyAMA0 port. But when I run the ncurses program, the other processes running in the background ...
0
votes
1answer
47 views

Finding which filesystem [duplicate]

I have an external hard drive and would like to know what kind of a file system it has. How do I find that out using the terminal?
2
votes
3answers
304 views

Log in with specific shell at terminal login

If I log in to a system over ssh, I can use the default shell with a simple ssh user@host, or specify something like ssh user@host 'bash --norc --noprofile' or ssh user@host ksh. Is it possible to ...
2
votes
0answers
108 views

zsh: Echoing every statement?

I have an odd problem with zsh when I switch between shells in a particular way: Option 1 (works well): I start a zsh shell. I switch to tcsh with /bin/tcsh, and I switch back to zsh with /bin/zsh ...
2
votes
2answers
5k views

How to install tar file (jhead) on Mac or Linux machine

I'm new to Linux and tar balls and was wondering how to properly install them on a Mac or Linux machine. I would prefer to know how to install on a mac but I just need some help understanding them. I ...
51
votes
7answers
3k views

How safe is it to cat an arbitrary file?

Sometimes when I cat a binary file by mistake, my terminal gets garbled up. Nothing a quick reset can't fix, but couldn't an attacker theoretically create a file that, when displayed on a terminal, ...
11
votes
2answers
806 views

What are the characters printed when Alt+Arrow keys are pressed?

When I press AltUp, A printed to terminal screen. Same thing happened when I pressed AltDown but B is printed instead. Other characters that I realized; AltLeft = D and AltRight = C What is the ...
6
votes
3answers
2k views

How to turn off the beep only in bash tab-complete

I find the beep useful for some things, so I only want to turn it off for tab completion (I'm not asking how to completely turn it off, that has already been answered in a different question on ...
4
votes
0answers
73 views

why . and .. are listed when ls -a command executed? [duplicate]

When I execute the ls -a command, all files and folders in that directory listed, as well as . and .. are listed too. Why is that? Are they a file or folder?
0
votes
1answer
296 views

How to map terminal shortcut from CTRL-M to another combination

I read in another post that you can type CtrlJ or CtrlM instead of the Return key in the terminal, which is great. But what I want to be able to do, is change that to another combination, for example: ...
4
votes
1answer
637 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 ...
2
votes
1answer
119 views

Can't open Gajim

When I try to open Gajim using terminal on gnome I get the following: Traceback (most recent call last): File "gajim.py", line 106, in <module> import common.configpaths File ...
10
votes
1answer
783 views

Why don't Linux terminal emulators support full colors?

I just upgraded my gnome-terminal to use 256 colors, yet I am a bit puzzled on the reason why a terminal emulator can't support the full palette any modern desktop environment provides. I guess ...
4
votes
4answers
1k views

Getting stdin from a named pipe

What I am trying to do is run python in a terminal window and redirect it's stdin from a named pipe. Then I write to the named pipe in another terminal and have that command execute on python. ...
2
votes
0answers
282 views

Change the default terminal for all .desktop files?

My htop.desktop launches XTerm, but I want to change the default terminal to xfce4-terminal in all "Terminal=true" .desktop files.
0
votes
1answer
191 views

Open screen in terminal after user login [duplicate]

When a user logins to my Debian server using e.g. Putty, I need to perform the following: It will automatically execute command screen -r MyWindow, and the user won't be able to leave the screen ...
7
votes
3answers
4k 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 ...
1
vote
0answers
144 views

vi hangs when run in /dev/console under LXC

I'm running an Arch Linux container from within lxc. The lxc-start command connects to the internal /dev/console, on which I have agetty running using the following command: /sbin/agetty --noclear -a ...
12
votes
3answers
7k views

Ctrl-s hang terminal emulator?

I came across a sentence in vimdoc: Note: CTRL-S does not work on all terminals and might block further input, use CTRL-Q to get going again. and this key indeed hangs my vim. I was ...
1
vote
2answers
126 views

Fixed terminal status lineS instead of shell prompt?

It is common to cram useful information in the Unix shell prompt, but I have too many things I want to keep an eye on to fit it all in one prompt: current Gnu screen window, current directory, current ...
2
votes
3answers
919 views

How to open konsole in fullscreen mode?

Is there a command or better yet a setting in the config file to allow me to open konsole (the KDE terminal emulator) in fullscreen mode?
2
votes
2answers
194 views

End process from another SSH window

I forgot to use screen and I have a task that has been running for quite some time, and I do not want to lose the saved data. Basically Ctrlc will end the task and save the data if I am on the same ...
0
votes
1answer
222 views

Move terminal emulator process from xorg to tty? [duplicate]

Is it possible (and if so, how?) to move a process from a terminal emulator running in X to a different virtual terminal, so that I can restart the X server without killing the process running in the ...
2
votes
2answers
209 views

Highlighting command in terminal

I am running long builds with lots of data that I need to read through after each build. But I have to start from bottom up to reach to top and it takes lot of time as all the text looks same. I was ...
1
vote
2answers
380 views

Mapping intr to del key

I am in the process of migrating a legacy 4GL application from SCO OpenServer 5.0.7 to CentOS (Red Hat) Linux 5.9. There are a number of screens that prompt the user to press "DEL to ABORT" but is ...
3
votes
2answers
2k views

Horizontal Scrolling in Terminal

So there are I believe 2 questions on this already. All of them to do with tail -f and hence people give the tangent answer of "use less". I need it for everything, every command, etc. The problem ...
0
votes
1answer
4k views

Centos freeing up disk space

I have a CentOS server running Plesk and it's run out of space on the plesk partition. I have narrowed down where a lot of the disk space is being used, but I'm not sure how to move forward. Can I ...
1
vote
0answers
178 views

Huawei modem change auto answer settings

Is there a way to change Huawei modem ATS0=1 command to be permanently set, so that there would not be need to send that command every time when modem is plugged in ? On each modem-plugin command is ...
2
votes
1answer
146 views

How to detect if a program is not run from a terminal

If I am running a reverse TCP shell and attempt to run su, I get the following message: su: must be run from a terminal I would like to emulate this behavior in my own program and am wondering how ...
1
vote
2answers
505 views

Invoke a command/script disconnected from the controlling terminal?

I'm investigating the behaviour of a script that is normally run as an automated process (e.g. cron, Jenkins). The script can (eventually) invoke commands that behave differently (seeking user input) ...
2
votes
1answer
270 views

What's those underscore commands?

When I tab tab _ in terminal, Bash suggests 206 posibilities. I tried to run one of them _git_rm but nothing happend, what are they? Here is a screenshot:
1
vote
2answers
492 views

change terminal window default location

How do I change the default gnome-terminal location on screen. I checked out the preferences but they only have option to change default size. I also checked out .gconf/apps/gnome-terminal/ but didnt ...
0
votes
1answer
410 views

How to change keyboard speed in the Linux console? [duplicate]

When I press Ctrl + Alt + F1 the desktop environment disappears and a terminal window appears. Pressing Ctrl + Alt + F7 brings me back to DE. This terminal is useful when the DE hangs for some reason ...
6
votes
3answers
5k views

Switch between tabs in gnome-terminal with keyboard?

Once I've created a new tab in gnome-terminal with Ctrl+Shift+t, how can I switch back and forth between the tabs using the keyboard? For example, in Google Chrome the keyboard shortcut is Ctrl+Tab ...
5
votes
2answers
3k views

Copy / paste text selections between tmux and the clipboard

I am running the latest version of tmux (from the git repository) and xclip (0.12), and I would like to be able to use Emacs-like keyboard bindings to move around the text in copy-mode, copy (M-w) ...
7
votes
4answers
5k views

Prevent SSH client passing TERM environment variable to server?

I'm currently using Fedora 18 gnome-terminal, then started tmux multiplexer in it. After I connected to a CentOS 5 server via ssh command, I find: ls result has no color tmux, screen, hexedit, htop ...
1
vote
0answers
102 views

touchpad scrolling lost when switching between physical and virtual tty

I have setup touchpad scrolling by running the following script in .xsession $ cat ~/bin/enablescrolling # enable two finger scroll synclient VertTwoFingerScroll=1 synclient HorizTwoFingerScroll=1 ...
5
votes
1answer
312 views

How to get background color in Emacs?

In Emacs no window mode, the background is automatically the same as the terminal (gnome-terminal). When I look at (frame-parameters) I see that (background-color . "unspecified-bg"). Well, for me, ...
0
votes
1answer
60 views

What characters in my printed boot scroll are artifacts?

I am a tech writer and I need to include a boot dump in a document. The dump the engineers gave me has some "bad characters" that I need to delete. What form does a "bad character" take? There are ...
0
votes
0answers
126 views

Send update ping to ping services in Terminal?

I want to send ping from http://www.mysite.com/rss.xml to http://rpc.pingomatic.com Is there any way using terminal to achieve this?
5
votes
1answer
37 views

IO and other shell commands when a program is not started by a terminal

I have several launchers on my desktop for various programs, and there is a "run in a terminal" setting for those launchers. When I check that setting, the program runs from a terminal, and logs its ...
0
votes
2answers
1k views

Why screen is not splitting my GNOME terminal?

I am working in a remote Linux box using VNC.I have a single terminal with lots of tabs opened in my system. How can I split them using the screen utility? Does the screen utility work with already ...