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

105
votes
11answers
80k views

How do I detach a process from Terminal, entirely?

I use Tilda (drop-down terminal) on Ubuntu as my "command central" - pretty much the way others might use GNOME Do, Quicksilver or Launchy. However, I'm struggling with how to completely detach a ...
76
votes
7answers
5k views

Why are special characters such as “carriage return” represented as “^M”?

Why is ^M used to represent a carriage return in VIM and other contexts? My guess is that M is the 13th letter of the Latin alphabet and a carriage return is \x0D or decimal 13. Is this the reason? ...
72
votes
4answers
41k views

Way to avoid ssh connection timeout & freezing of terminal tab

When I connect via ssh terminal to certain servers, it timeouts and "freezes" the terminal (doesn't accept, doesn't disconnect, can't Ctrl-C to kill the ssh process or anything). This is in Ubuntu's ...
65
votes
3answers
19k views

What is the difference between shell, console, and terminal?

I'm confused with the terminology. What is the difference between shell, console, and terminal?
52
votes
5answers
25k views

Using Ctrl-Tab to switch between tabs in Mac Terminal.app

How can I make Ctrl-Tab and Ctrl-Shift-Tab switch between tabs in Terminal.app on a Mac (OS 10.4 and 10.5 specifically)? This is how I switch tabs in Firefox and Aquamacs, and Command-Shift-[ and ...
49
votes
6answers
26k views

Why does terminal say: “You have mail”?

Any idea why my Mac terminal says: You have mail in /var/mail/lofye How can I make it stop saying that every time I open terminal?
46
votes
5answers
82k views

Where to find the .bashrc file on Mac OS X Snow Leopard and Lion?

I want to install rvm on my Snow Leopard machine. It says I need to add a line to my .bashrc file (I'm using bash) but where is my .bashrc file?
39
votes
5answers
19k views

How can I change the keyboard shortcut for switching tabs in Mac Terminal?

I know that you can switch tabs with shift cmd [arrow key] in Mac Terminal, but it is painful to reach the arrow key. How can I change the default keybinding?
38
votes
2answers
39k views

How to find out Mac OS X version from Terminal?

I know how to find Mac OS X version from GUI: Apple Menu (top left) > About This Mac Is there a Terminal command that will tell me Mac OS X version?
38
votes
3answers
12k views

less is more? Is more less? I'm so confused

When I first heard their names, I got really confused when I tried to guess what these tools might do, I thought I'd misheard something. What's the difference between more and less, i.e. why ...
37
votes
5answers
16k views

Set the title of the terminal window to the current directory

How can I get the Terminal.app in OS X to display the current directory in its window or tab title? I'm using the bash shell.
34
votes
2answers
818 views

How do I teach my linux command line manners?

Whenever I complete something in the command line while using Ubuntu and my computer does something of value to me, I enjoy saying thank you, just because it's the polite thing to do. A typical ...
31
votes
2answers
6k views

Icon? file on OS X desktop

When I ls my Desktop from terminal (by using ls ~/Dekstop), I see a file, Icon?. As far as I can tell, it's empty (nano Icon? shows nothing). It doesn't show up on my actual Desktop, and open Icon? ...
29
votes
7answers
10k views

How Can I Speed Up Terminal.app or iTerm on Mac OSX?

Every time I launch either iTerm or Terminal after not using it for a few hours, it takes anywhere from 10-20 seconds to return a prompt. The screen is blank, and although I can type I can't actually ...
26
votes
4answers
8k views

With Bash + iTerm2, how to name tabs?

In iTerm2 (Build 1.0.0.20120203), I typically open several tabs, each of which has split panes , and is about one particular theme of work, for example revision control, coding, managing files, mysql ...
24
votes
1answer
2k views

What does Terminal app's “Show Alternate Screen” do? (OS X)

Today, I discovered a menu item called "Show Alternate Screen" in Terminal.app. I am just curious about what it does. It seems to be sharing the same shell process (unlike tabs), since I see output ...
23
votes
1answer
3k views

htop isn't returning CPU or memory usage!?

I think that top is great application to monitor a Linux system. I really like it, but top doesn't look so good on Mac. I know that Mac have a system monitor to do it, but I prefer using a terminal. ...
22
votes
5answers
6k views

.profile and .bashrc doesn`t work on my Mac

This problem I have for a long time. After running terminal .profile, and .bashrc file doesn`t work (are not executed). Could you indicate where should I looking form a source of problem?
21
votes
3answers
16k views

How do I alternate tabs in Linux GNOME terminal?

I like to open several tabs in GNOME terminal when I work. In Firefox, you can switch between tabs using Ctrl-Tab or Ctrl-Shift-Tab. How do I get the same functionality in GNOME terminal?
21
votes
1answer
8k views

Make “pro” style terminal default when opening new tab/window

Mac OS X 10.6 In Terminal preferences, the default startup window can be set to different style. But the keyboard shortcut "cmd-T" & "cmd-N" can only open the basic style terminal. How can I ...
21
votes
3answers
27k views

How to show output on terminal and save to a file at the same time?

I am using: user@unknown:~$ sudo command -option > log to save the results of "command" to the file "log", but I'd like to also get the result on the terminal, is this possible? I am using ...
20
votes
5answers
8k views

How can I get the Mac Terminal to not beep?

I'd like to prevent the Mac Terminal program from beeping, for example when there are multiple possible completions when I hit TAB. I looked in the preferences, but there's nothing about beeping.
20
votes
5answers
5k views

Is there a shortcut to mkdir foo and immediately cd into it?

This is something I do frequently $ mkdir foo $ cd foo This works as a single command, but it's more keystrokes and saves no time. $ mkdir foo && cd foo Is there a shortcut for this? ...
20
votes
2answers
11k views

List files bigger than filesize specified

How can I make ls (or any other particular command) to list me only files bigger than a specific file size?
20
votes
5answers
13k views

Save multiple gnome-terminal layout?

I have multiple gnome-terminal windows open. Is there a way to save the settings (window position, no. of tabs, title etc). across OS reboots ?
20
votes
4answers
29k views

What's the difference between .profile and .bash_profile, and when do you configure which? (Mac) [duplicate]

Possible Duplicate: Difference between .bashrc and .bash_profile What's the difference between .profile and .bash_profile, and when do you configure which? I.e if I configure the ...
20
votes
6answers
9k views

OS X Terminal.app: how to start a new tab in the same directory as the current tab?

I frequently need to open a new tab in the same directory as my current tab to do something else while my current tab is occupied by a long running process. However, by default when you create a new ...
19
votes
4answers
7k views

which/whereis differences

What's the difference between which and whereis ?
18
votes
1answer
7k views

How can I make the terminal window close automatically on OS X?

Whenever I type 'exit' or I logout, the terminal window stays open and I have to close it manually. Can I change this behavior?
18
votes
1answer
21k views

Terminal Command To Find What Version Of Git I Have Installed?

What is the terminal command to find what version of Git is currently installed on my system?
18
votes
3answers
15k views

How to have full directory path always shown in mac terminal (like linux terminal)

In my ubuntu terminal I have always current directory shown completely. Just like this: blabla@blublu:~/music/my_album/classical/beethoven$ But in my Mac (Mac OS X 10.6.5) terminal does not show ...
17
votes
11answers
12k views

Undo the Linux trash command

Can we undo operations done in a terminal, for example, file deletion through rm? Solutions obtained: Aliasing Undelete utilities Backup utilities LibCrash Versioning (FUSE)
17
votes
4answers
13k views

How do I close the Terminal in OSX from the command line?

Why doesn't "exit" close a Terminal.app window on Mac OS X? $ exit logout [Process completed] Is there a way to close the window without using the mouse?
17
votes
2answers
13k views

How to find files with certain text in the Terminal

I'd like to find all files that contain a certain string of text. How would you do that in the Terminal?
17
votes
2answers
10k views

How can I get the current screen resolution from the command line on OS X?

How can I get the current display resolution from the command line in OS X?
17
votes
1answer
13k views

How to open a menu with 'Open Terminal Here' in Ubuntu 10.04 by left clicking desktop, or inside folder?

How can I customize Ubuntu 10.04 so the menu created by left clicking inside a folder or desktop gives me the option of opening up a terminal in that location? I have thsi functionality in the XFCE ...
16
votes
8answers
41k views

How to create an ssh connection Terminal shortcut on Mac OS X Snow Leopard?

It sucks to open Terminal each time and write a complete ssh command. I also have a custom port to connect to.
16
votes
6answers
14k views

How can I open a URL in Google Chrome from the terminal in OS X?

How can I open a URL in Google Chrome from the terminal in OS X? This is what I'm trying: /usr/bin/open -a "/Applications/Google Chrome.app" --args 'http://google.com/' It focuses Chrome but does ...
16
votes
9answers
5k views

Zsh: Open a new tab in the same directory

Say you are in /very/cool/and/deeply/nested/folder . And you want to open a new terminal tab in the same folder. How would you do that? I use Mac OS and Zsh.
16
votes
1answer
5k views

Binding a command in tmux without using the prefix key

Is it possible to bind a tmux command to a key combination and use it directly without first pressing the prefix? I find C-b + n too cumbersome to switch panes, so I was wondering whether I could ...
16
votes
5answers
14k views

Keyboard shortcut to jump between tabs on OS X Terminal

In OS X Terminal.app, if you open new windows, you can easily switch between them with Cmd-1, Cmd-2, Cmd-3, etc. You can also cycle between tabs, using Cmd-Shift-{ and Cmd-Shift-}. (or Cmd-Shift-Left ...
15
votes
3answers
8k views

Safely get rid of “You have new mail in /var/mail” on a Mac?

I was messing around with sendmail in Rails a year ago and have had this message popping up in the terminal after every command ever since: You have new mail in /var/mail/Lance How do I properly ...
15
votes
4answers
23k views

List the current folder folder's sizes with the terminal?

I want a list of the folders from the current directory or one that I specify with their size. I have tried with du but I only get the size of the directories I specify (du . ./f1), and ls doesn't ...
15
votes
4answers
14k views

terminal tool (linux) for repair corrupted zip files

I've a corrupt zip file. I've tried to repair it with zip -F file.zip and zip -FF file.zip but was not successful. Is there another terminal tool under Linux for repairing?
15
votes
3answers
4k views

Clear command from terminal in OS X

Say I've typed out a command in terminal 'mv *.jpg ..\photos' and as I'm typing realize I no longer want to execute this command at all. I want to just delete the entire statement. I don't want to ...
15
votes
4answers
13k views

Is there a multi-tab terminal replacement for Cygwin's terminal? [duplicate]

Is there a multi-tab terminal replacement for Cygwin's terminal?
15
votes
3answers
32k views

Release/Renew IP Address via Terminal in OS X

I am looking to release and renew my IP address in OS X 10.4 using Terminal. Essentially, I need the OS X equivalent of Windows: C:\> ipconfig /release C:\> ipconfig /renew However, I need the ...
15
votes
2answers
3k views

tmux and screen-256 TERM not supported on remote hosts

I have set up my tmux to use screen-256colors and it works great with vim. However, when I ssh to a remote host from within tmux, screen-256colors isn't recognized, so I'm getting errors like this: ...
15
votes
1answer
6k views

Use terminal scrollbar with tmux

I know how to scroll in tmux using the keyboard, but I noticed that it looks like there's a way to use the terminal scrollbar with GNU Screen. Can this be done with tmux?
14
votes
9answers
21k views

Copy all files and folders excluding subversion files and folders on OS X

I'm trying to copy all files and folders from one directory to another, but exclude certain files. Specifically, I want to exclude subversion files and folders. However, I'd like a general yet ...