Questions tagged [terminal]
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, also referred to as a "system console".
4,945
questions
402
votes
21
answers
562k
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 ...
309
votes
10
answers
951k
views
How do I find a file by filename in Mac OSX terminal?
I want to find a file on my Macbook with the filename: abc.dmg. I've tried to use spotlight, but it doesn't find it. When I tried find, and used: find -name abc.dmg -path /, I got errors back.
What ...
275
votes
9
answers
318k
views
In vim, how can I quickly switch between tabs?
In gnome-terminal, I can just press Alt + (1, 2, 3, etc.) to switch to specific tabs. I can also use Ctrl + (PgUp / PgDn) to cycle through tabs (admittedly less convenient, but it can be remapped).
...
258
votes
5
answers
385k
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?
254
votes
8
answers
190k
views
Way to avoid ssh connection timeout & freezing of GNOME Terminal
When I connect via ssh to certain servers, it timeouts and "freezes" the terminal (doesn't accept input, doesn't disconnect, can't Ctrl-C to kill the ssh process or anything).
This is in Ubuntu's ...
239
votes
6
answers
149k
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?
217
votes
17
answers
139k
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 ...
204
votes
6
answers
483k
views
How to close a tmux session
I am using tmux to manage multiple terminal windows. Currently I have 2 windows open with multiple panes.
I know that I have to use the prefix (for me it is ctrl+a) to enter commands.
How can I ...
200
votes
8
answers
171k
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?
196
votes
10
answers
302k
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 ...
177
votes
5
answers
191k
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?
166
votes
5
answers
1.2m
views
Where is the .zshrc file on Mac?
I’m using iTerm and wanted to customize the look of my terminal window using Oh My ZSH!. And according to the documentation I need to change the ~/.zshrc file and add a ZSH_THEME value:
Once you ...
157
votes
5
answers
56k
views
which/whereis differences
What's the difference between which and whereis ?
139
votes
10
answers
145k
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 ...
131
votes
15
answers
154k
views
How to force GPG to use console-mode pinentry to prompt for passwords?
Using gpg from a console-based environment such as ssh sessions fails because the GTK pinentry dialog cannot be shown in a SSH session.
I tried unset DISPLAY but it did not help. The GPG command line ...
119
votes
3
answers
205k
views
List files bigger than filesize specified
How can I make ls (or any other command) list only files bigger than a specific file size?
116
votes
6
answers
87k
views
Play sound on mac terminal
I have a script running in the background and sends me an alert every few minutes. I want the alert to be in the form of a beep.
Question: How can I play a beep in mac terminal?
116
votes
2
answers
657k
views
How to stop a process in Terminal [duplicate]
Possible Duplicate:
Ending a process in unix instead of interrupting it
When I task in Terminal, such as ping blah.com, how do I then stop this task (other than closing the Terminal window. In ...
113
votes
4
answers
113k
views
What's the difference between ^C and ^D for UNIX/Mac OS X terminal?
When I try to stop something, I use ^C and sometimes ^D in terminal.
What's the difference between the two? Why some program doesn't respond to ^C, but ^D.
Why the Terminal.app just quits when I use ^...
113
votes
7
answers
164k
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?
112
votes
11
answers
69k
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?
Edit
...
106
votes
9
answers
589k
views
How to switch git user at terminal?
I am trying to push a project to a remote repository from the command line.
From inside my local directory, I hit:
$ git push
and obtain the following error:
remote: Permission to username1/repo....
106
votes
11
answers
155k
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 ...
106
votes
3
answers
27k
views
Previous commands wrapped with square brackets in OS X Terminal
Yesterday my terminal started surrounding commands that had been run with square brackets. I'm not sure how I've turned this on, but would like to turn it off.
Example:
So far, I've done:
Checked ...
106
votes
3
answers
105k
views
Mac OS X: conventional places where binary files should live
I've downloaded an application that is a command-line application, and want to put it somewhere where I can run it from the command-line without having to type the path explicitly.
What are the ...
104
votes
2
answers
8k
views
Delete entered password in hidden password prompt (Linux) with shortcut
Is there a way to delete all characters that I entered in a hidden password prompt in Linux? For example, when I SSH to a server, it asks for my password where the entered keys are not shown:
$ ssh ...
103
votes
13
answers
161k
views
What commands can I use to reset and clear my terminal?
I have been using the command:
reset
to clear my terminal. Although I am pretty sure this is not what I should be doing. Reset, as the name suggests, resets your entire terminal (changes lots of ...
102
votes
4
answers
64k
views
Icon? file on OS X desktop
When I ls my Desktop from terminal (by using ls ~/Desktop), I see a file named 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 ...
99
votes
6
answers
280k
views
How do I find my user ID and group in Mac OS X?
Trying to run this compand in terminal:
sudo chown -R yourid:yourgroup local
However, I have no idea what my ID and my group are, or where to find them. Any ideas?
98
votes
7
answers
16k
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? ...
97
votes
5
answers
321k
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?
97
votes
1
answer
91k
views
Undo OS X terminal window split
I constantly split my terminal windows accidentally by pressing Cmd+D (it's so close to Cmd+F). I have no idea how to undo this. Any ideas?
95
votes
4
answers
101k
views
Re-enter interactive mode after Ctrl-z
In interactive mode (in Octave, gnuplot, R, etc.) I occasionally press Control + z by mistake. This pauses the program and kicks me back to the terminal.
Is it possible to re-enter the original ...
93
votes
6
answers
107k
views
Access iCloud Drive via terminal
OS X 10.10 was just released, and one of the features I personally awaited the most was iCloud Drive. Unfortunately, I had to learn that it was not as accessible as Dropbox.
file ~/Dropbox
/Users/...
89
votes
4
answers
211k
views
Updating Time : ntpdate[3108]: the NTP socket is in use, exiting
The time on my system is incorrect for some reason.
i need to run an update but i can't seem to be able to
this is the errror.
ntpdate pool.ntp.org
31 Aug 12:31:59 ntpdate[3108]: the NTP socket is in ...
89
votes
7
answers
158k
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?
89
votes
1
answer
204k
views
Terminal Command To Find What Version Of Git I Have Installed?
What is the terminal command to find the version of Git currently installed on my system?
88
votes
7
answers
50k
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 ...
88
votes
3
answers
224k
views
downloading file using scp command
I have a centos server lets say with ip: 1.2.3.4. I want to download a file from 1.2.3.4 at path /root/pc/filename.rar to my localhost host (current pc). What command I need to download that file? I ...
87
votes
9
answers
98k
views
Clear terminal using keyboard shortcut
I was curious if there is a way to clear the terminal buffer/output through some keyboard shortcut. I am using Ubuntu. I am aware that
Ctrl + L
clears the terminal, but you can still scroll back to ...
85
votes
11
answers
295k
views
How to get vertical split of terminal in Mac to execute different actions?
Every once in a while I see people using what looks like terminal in their Mac, except that in what seems to be one window they have a vertical 'split.' On one side of the split, they have emacs or ...
85
votes
4
answers
219k
views
Using vim to force edit a file when you opened without permissions
I use vim to edit a file. Sometimes, I forget to have the appropriate permissions. I run vim and the file as a read only file. I can make changes, but I can't actually write the changes. Every once in ...
84
votes
5
answers
75k
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?
83
votes
4
answers
25k
views
iTerm2 (version 3): Individual history per tab?
I’m using iTerm2 (version 3) and like it. But something that it has been doing for a while that's really annoying is that the command history is shared between tabs. E.g., in your first tab, run ...
81
votes
9
answers
24k
views
How to disable scary terminal commands?
How do you disable scary terminal commands?
I was using SSH to access a remote Ubuntu server without access to the physical server. I thought I was typing 'shutdown' into the NoSQL server running on ...
81
votes
3
answers
128k
views
Copy a directory on Unix
How can I copy a directory structure, dir1, to dir2, (with all the subdirectories) on Unix using the terminal window?
80
votes
5
answers
18k
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.
...
78
votes
7
answers
48k
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.
78
votes
5
answers
191k
views
How can I run a command from the terminal without blocking it?
I run a lot of programs in Ubuntu from the terminal, but I would like to be able to continue using the terminal after I have a program open. How can I put the programs in the background so that I don'...
76
votes
9
answers
209k
views
How can I use a Bash-like shell on Windows?
I use Linux and a Mac, and I'll be teaching some command line stuff soon.
What can I install on Windows to give me a terminal window most similar to a basic Mac/Linux Bash shell?
I would like to ...