A terminal is a hardware device used for entering data into and displaying information from a computer. Terminals were frequently used in the days of mainframe computers. Today, most operating systems offer text-based "terminal emulators", which replicate the functionality of a classical terminal, ...

learn more… | top users | synonyms

7
votes
1answer
5k views

How can I grep with color in Mac OS X's terminal?

I recently found that on Mac OS X I can set this up in my shell ~/.profile so that when I use grep it will print the matches in color (white one red). alias grep='GREP_COLOR="1;37;41" LANG=C grep ...
7
votes
6answers
1k views

Text Terminal Hardware (for Linux)

Is there any way to obtain a hardware text terminal (preferably small in size) with a screen and a keypad to connect to a Linux machine (preferably via usb)? I'd like to be able to log into a command ...
7
votes
2answers
7k views

How do I set a default nick for new irssi connections?

When trying to connect to an irc server in irssi, I get the following error: root Erroneous Nickname: Reserved for services I don't know how to change the nickname before the connection is ...
7
votes
3answers
26k views

color coding mac terminal

how do i get the mac terminal to display colors? i.e. in fedora when i use ls it color codes the results based on if it's a file or folder. similar results on mac?
7
votes
3answers
4k views

OS X Terminal Tutorials [closed]

So, I am started to get settled into everyday life with my Mac now and want to be able to utilise the power of the Terminal. Can you provide any good tutorials or sources which will help me learn?
7
votes
2answers
2k views

ssh sessions in xterms freeze for many minutes whenever they disconnect

If I ssh to a remote machine and then lose internet connectivity, the session freezes. I can't control-c or otherwise abort and go back to my local xterm or terminal prompt but if I wait several ...
7
votes
4answers
4k views

GNOME Terminal - process name in tab title

How can I put the current running process name into a GNOME Terminal tab title (or title bar when there's only one tab)? -- UPDATE -- To clarify, I want the tab title to update when I run a process, ...
7
votes
2answers
7k views

How do I set up an AppleScript to open a new iTerm2 tab and change the directory?

In OS X, how do I set up an AppleScript to open a new iTerm2 tab change to a directory clear the console echo the current directory I had something like this before for regular Terminal, but I ...
7
votes
3answers
5k views

Lightning bolt for prompt (PS1)

I've seen on a few screencasts a while back where someone had a lightning bolt instead of $ on the bash prompt. Does anyone know how to do this?
7
votes
2answers
3k views

Enable 256 colors for cygwin under mintty?

I am using cygwin via mintty, which is the default. I installed ncurses. I then run these commands to see what my color pallet is for this terminal session: $ tput colors 8 I have googled but so ...
7
votes
1answer
1k views

OS X Mountain Lion terminal tab name + open a new tab in the same directory

1) In Mountain Lion, through Preferences, you can change the setting of Terminal so that a new tab can be opened in the same directory as the opening tab. (i.e. if I am at ~/workspace and I open a new ...
7
votes
3answers
10k views

Enabling SSH Daemon from Terminal (OS X Lion)

I am trying to find a way of turning on SSH through terminal, instead of opening settings and turn it on that way. Or perhaps a way to turn SSH on by running a .pkg file? I am running OS X Lion, but ...
7
votes
4answers
19k views

On Mac, how do I give myself permanent sudo privleges?

In Mac OS X 10.6, how do I give myself permanent sudo privleges? is it like linux, in the "/etc/sudoers" file?
7
votes
1answer
1k views

tmux: close session while open

I am using tmux to manage multiple terminal windows. Currently I have 2 windows open with multiple panes. How can I close the session from inside of tmux. I know that I have to use the prefix (for me ...
7
votes
3answers
11k views

Ctrl+Alt+T doesn't open a Terminal in Cinnamon 1.6

I just updated to the stable version of Cinnamon 1.6 in Ubuntu 12.04 x64, but I found a bug which just get's me out of my skin. The key combination CtrlAltT which is supposed to open up the Terminal ...
7
votes
2answers
2k views

Pretty print folder structure using linux terminal?

How can you pretty print a directory structure with all subdirectories to the deepest level in the linux terminal(ubuntu)? This is an example of such a pretty print output for a mysite folder: mysite ...
7
votes
4answers
6k views

Mac OS X Terminal not logging in

I am running Mac OS X version 10.6.3 and when I open the terminal (with terminal.app or iterm) it just hangs on the login process. I've tried restarting, changing the startup command to /bin/bash, and ...
7
votes
2answers
1k views

How to reclaim ^S in zsh?

I've found ^S mapped to be the fwd-search key for zsh (ohmyzsh) but I would like to use it in vim for various mappings as well - it seems like the zsh mapping is preventing me from using it now. Any ...
7
votes
1answer
13k views

Redirect input from one terminal to another

I have sshed into a linux box and I'm using dvtm and bash (although I have also tried this with Gnu screen and bash). I have two terminals, current /dev/pts/29 and /dev/pts/130. I want to redirect ...
7
votes
1answer
273 views

How can you reverse the direction of alt-period in Bash?

In Bash, you can press Alt-. to insert the last argument of the previous command. If you press it multiple times, it cycles through the last arguments of all of the commands in your history. However, ...
7
votes
1answer
643 views

bash: per-command history. How does it work?

OK. I have an old G5 running Leopard and a Dell running Ubuntu 10.04 at home and a MacPro also running Leopard at work. I use Terminal.app/bash a lot. On my home G5 it exhibits a nice feature: using ...
7
votes
1answer
910 views

Mac OS X Lion Terminal SSH connection sharing error

I sometimes get this error when I try to ssh to a remote host: mux_client_request_session: read from master failed: Broken pipe I'm using Macbook Air OS X Lion with this in ~/.ssh/config: ...
7
votes
2answers
800 views

MacOSX 10.6.7 cuts off stdin at 1024 chars

I've written a little perl script that I invoke as follows: perl -pe'...' <a I wanted to copy the contents of the input file 'a' from a web browser (a whole wordpress blog entry, to be exact). ...
7
votes
3answers
12k views

How can I get Mac OS X's proxy information in a Bash script?

I have several network locations set up on my laptop: Work, Home, etc. The work one(s) all have a proxy server set up, while the others don't. This works fine for OSX applications -- Safari, Mail, ...
7
votes
3answers
729 views

How to remove a file with unprintable charaters in Mac OS X Terminal [duplicate]

Possible Duplicate: Removing file with strange characters in filename in OS X I have a folder that has a file who's name is Icons and ends with an additiona unprintable character. I can see ...
7
votes
5answers
1k views

Is it possible to get your router's external ip address without using a website?

I was wondering if there was a way to find out your router's ip address without using a website like www.whatismyip.com. I searched around, and I am beginning to think it is impossible. If that is ...
7
votes
2answers
12k views

How to drop all MySQL tables from the command-line?

Usually I open Terminal.app and connect to a remote MySQL database. Then I use this command to drop a table: mysql> drop table [table name]; But what I need is the command line to drop all ...
7
votes
4answers
3k views

iTerm 2 window resizing

My iTerm 2 window is up against the menubar at the top of the screen. When I resize the window vertically from the top to the bottom, a small gap is always left. It never resizes down fully to the ...
7
votes
3answers
783 views

Duplicate pseudo terminals in linux

On a redhat box [ Red Hat Enterprise Linux AS release 4 (Nahant Update 3) ] Frequently we notice two people being assigned to the same pseudo terminal. For example: $who am i user1 pts/4 Dec ...
7
votes
2answers
3k views

Mac OS Lion - Always show menubar with fullscreen apps?

Does anyone know if it is possible to keep the menubar in Mac OS Lion visible for fullscreen apps instead of hidden until hovered over? I imagine there's some Terminal command I can enter to adjust ...
6
votes
9answers
2k views

How can I recover source overwritten by a bad compile command?

I had written a source code of C++ and complied it with the same name using the following command line. For example: c++ source-code.cpp -o source-code.cpp Now my source code has been replaced by ...
6
votes
8answers
2k views

'End Process' equivalent on linux

Currently i am using the system monitor of gnome. It is like task manager, and has a function to end process, but sometimes this makes everything freeze and it locks up. Is there any way to fully end ...
6
votes
5answers
912 views

Syncing bash profile between computers

I have tons of stuff in my .bash_profile. The problem is, I use ~3 computers very frequently, and I'm tired of having to copy paste my prefs everywhere. Two of them run Ubuntu 10.10, and one runs OSX. ...
6
votes
3answers
6k views

How do I set my shell in Mac OS X?

I know I can set "Shells open with" in the Terminal preferences, but I'm curious if there's any system-wide way of setting this (similar to updating /etc/passwd in some Unixes).
6
votes
2answers
1k views

Passing options to a program: what's the convention for one dash vs two?

Some programs will take options like this: $ someprogram -orange apple And other programs will use something like this: $ otherprogram --orange apple Is there a "rule" or convention for this in ...
6
votes
6answers
4k views

Removing the escape characters from GNU Screen's screenlog.%n

Is it possible to remove the ESC sequences in GNU Screen's output file? Things such as colours, tabs and other escape characters make their way into the log files and become difficult to decipher. ...
6
votes
3answers
9k views

Installing a library locally in home directory, but program doesn't recognize it

I am installing a program on a server as a non-root user. Specifically it is tmux 1.5, but this should apply broadly to all locally installed program in my opinion (I mention the program name in case ...
6
votes
6answers
2k views

What is the difference between “Shell” and “Terminal”? [duplicate]

I am fairly new to Ubuntu and I am loving it! But I don't quite understand the difference between the shell and the terminal. Can any one explain? Someone told me that a terminal is just a "tool" to ...
6
votes
4answers
812 views

How to selectively navigate through Bash command history on a Linux terminal [duplicate]

Everyone knows (or should know!) that on a terminal the up and down arrow keys are used to navigate through the history of used commands. When you use the terminal on a daily basis, your command ...
6
votes
1answer
242 views

I deleted my aliases file, but my aliases are still in my bash session - how can I recover them?

I had a ton of aliases defined and I use them all the time. I have a terminal session open now in which all the aliases are valid and working. However, the .bash_aliases file in which they were ...
6
votes
3answers
2k views

'cd' command in terminal - using partial folder name

If I want to navigate inside folder with long hard-to-type name, is there way to use 'cd' with some kind of shortened name of this folder, to get free from unnecessary work?
6
votes
4answers
39k views

How do I recursively remove subdirectories and files, but not the first parent directory?

I'm able to use the following to remove the target directory and recursively all of its subdirectories and contents. find '/target/directory/' -type d -name '*' -print0 | xargs -0 rm -rf However, ...
6
votes
5answers
7k views

Can you find out the IP SSH-ing your computer?

If computer A SSHs computer B, can computer B find the IP of computer A? If so, how?
6
votes
4answers
26k views

Mac Terminal SSH file transfer?

Is there a way to transfer files directly from a Mac to another using only Terminal? Perhaps using SSH?
6
votes
4answers
3k views

Launching tmux using gnome-terminal

I'm a little confuse regarding how one launches tmux. When I launch my terminal (current gnome-terminal), I would like to have tmux up and running. I'm currently doing this by calling "tmux" in my ...
6
votes
2answers
11k views

Save output to a text file from Mac terminal

How could I enter a command, say, system_profiler, and have the output save somewhere on my computer?
6
votes
3answers
3k views

Using wildcards in commands with zsh

Using commands such as rsync and scp with ZSH I've run into trouble. Instead of the (normal) behaviour of giving me all matching files, it won't run and returns: ➜ ~ rsync -azP user@server:~/* ~/ ...
6
votes
1answer
6k views

Set default terminal in Ubuntu 12.04

I've set the default terminal using sudo update-alternatives --config x-terminal-emulator but every time I press Control + Alt + T, it still opens up gnome-terminal. I would like to change it to ...
6
votes
2answers
9k views

How to set up a shortcut to a directory in Mac OS X Terminal?

What I'd like to be able to do is when I'm in Terminal is to type: cd myFolderShortcut And for it to go straight to a directory I have a set up with this alias. Is this possible? I did do a google ...
6
votes
5answers
5k views

Clearing terminal

I would like to issue a command from a bash script to clear the terminal it is running from: I don't want to clear the bash history (history -c) I don't want to issue the clear command (which ...