questions narrowly about terminal.app alone should use this tag. Please consider using **command-line** for any question not specifically about the native terminal app

learn more… | top users | synonyms

4
votes
1answer
115 views

Remove username from terminal title

I want to be able to retitle my terminal windows. I've found many examples on the web, but no matter what I do, the string is always prefixed by my username. I want to remove that; how do I do so? ...
78
votes
2answers
13k views

What functionality do 'marks' offer in the El Capitan Terminal?

Since upgrading to OS X El Capitan, I've noticed a change in the Terminal: Executed lines show an opening bracket on the left, and a closing bracket on the right, as shown in this screenshot: ...
0
votes
2answers
30 views

Where is my mbox located at?

The Terminal keeps telling me I have mail from scripts that are hitting errors, and then when I scroll through the messages to read them, it tells me afterwards saved x messages in mbox. Where is my ...
1
vote
1answer
114 views

Boot problem on dual-boot MacBook Pro

Can anyone help me restore the original boot 'order' on my Mac, using command-line? I wanted to install Ubuntu on my Macbook Pro Retina (early 2013), so I could run some specific software I needed ...
22
votes
5answers
41k views

How to set system-wide environment variables on OS X Mavericks

We used to use /etc/environment to set system-wide environment variables on Mountain Lion. However, it seems this file is no longer read. Ideally the solution should apply to all users, and we need ...
27
votes
6answers
156k views

How do I set environment variables on OS X?

I have always difficulties setting the Environment variables in OS X like JAVA_HOME, M2_HOME or PATH. How to set these on OS X Mavericks? I did some research but the answers I've found didn't really ...
0
votes
1answer
17 views

How do I change/delete alias in OS X permanently?

I tried to modify/delete alias, but it seems that it is only for the current session by doing this unalias name or rename it unalias name='...' Can anyone tell me the way to change/delete it ...
3
votes
2answers
215 views

Mac OS X unusual bash activity?

So when I checked my computer this morning I had Terminal open saying: Last login: Sat Mar 5 00:02:43 on ttys000 I checked uptime and it's been up 27 days, 2 users as usual. Now I know for a fact ...
2
votes
2answers
51 views

.bash_profile not updating until open new Terminal window

I am trying to create a Terminal command. I have created this so far: cd ~/ && touch .bash_profile && echo "" >> .bash_profile && echo "alias sendtext=\"osascript -e 'on ...
0
votes
0answers
9 views

How do I make a Run Shell Script Automator action that will change the username and password of a specific internet password item in Keychain?

I am trying to make an application that allows me to quickly switch between two logins on an 802.1X network. I already have a portion that prompts me for which account I would like to log in to and ...
6
votes
5answers
36k views

How do I delete a BootCamp partition using Terminal's diskutil?

For some reason, the BootCamp Assistant app won't let me delete my BootCamp partition. How can I do so using Terminal and the diskutil terminal app?
14
votes
4answers
2k views

Opening tab in Terminal resizes window

I like to adjust my terminal window size to fit whatever I'm working on at the moment—sometimes a tiny screen just to tail a log file, and sometimes I stretch it all the way across the screen to read ...
124
votes
5answers
64k views

git auto-complete for *branches* at the command line?

On my linux machine I have autocomplete for branches with git. [Note we are talking about git branch completion, not bash completion (e.g. commands, files, etc). Thus NOT lane's answer at all] For ...
49
votes
9answers
16k views

How do I speed up new Terminal tab loading time?

How can i speed up the terminal startup in Lion? I'm not referring to the startup of the Terminal application, but to the startup terminal windows, like when i open a new tab. I don't have anything ...
0
votes
0answers
12 views

“Display Notification” stuck in loop in Bash script

Is there any way I can fire a banner notification once through a bash script? I'm trying to modify this BitBar plugin to be a little fancier: #!/bin/sh # <bitbar.title>Gmail ...
6
votes
2answers
2k views

Is it possible to download Apple's Command Line Tools for Xcode from the command line?

Background My job gives me temporary MacBook Pros for travel purposes. I get them with a fresh OS install before I leave, and when I return, they blank the hard drive. The trips usually require some ...
20
votes
3answers
49k views

Wake Other Computers from Mac OSX

Is there a terminal command within Mac OSX that will allow me to use WOL (Wake On LAN) to wake up other computers? Windows has wolcmd, is there an equivalent within OSX? I am trying to wake a ...
2
votes
2answers
370 views

How to execute Terminal command using selected text?

I want to bind a shortcut to run a command in Terminal with text that I selected while web browsing. How could I do this?
1
vote
2answers
20 views

Is it possible to invoke play button using terminal?

I want to control my media player (iTunes, Spotify, etc) using terminal. My goal was simply to trigger press on play/pause button using script. Is that possible?
0
votes
0answers
30 views

Troubleshooting converting Ubuntu.iso to ubuntu.img with hdiutil in Terminal

When I try this command: hdiutil convert /Users/Example/Example/ubuntu.iso -format UDRW -o /Users/Example/Example/ubuntu.img The terminal says that the image is not recognize, what am I missing?
1
vote
1answer
29 views

How to make Terminal windows persistent

How can I make it so Terminal will remember the currently open windows on Quit, and reopen those windows, with all the existing text intact? I have two machines: Both on El Cap Both with identical ...
12
votes
4answers
5k views

How much data has been written to my SSD over its lifetime?

Is there a Terminal command which will show me how many GB has been written to my SSD through the whole lifetime of the disk? I'm asking because I want to find out how many cycles have been done. SSD ...
0
votes
1answer
71 views

Looking for an ARD/ Unix command to clear firefox history/cache on a mac

I'm trying the following but not having any success in seeing anything cleared: rm -R /Users//Library/Caches/Firefox/Profiles/.default/Cache Thanks!
1
vote
1answer
38 views

Remove characters preceding the second underscore in file names

I have a bunch of files and I would like to remove all characters preceding the second underscore in the file names. An example is shown below. How do I do this using bash commands? [From] ...
1
vote
1answer
51 views

iTerm2 does not show username, machine name, time

On my new mac machine, I could not do autocomplete for Git when I hit Tab. So I thought to modify the terminal and found certain things on this link. I may have messed when I installed iTerm2, ...
1
vote
0answers
16 views

Applescript claims to run shell script, but script has no effect [duplicate]

So I have a bash script like this: #!/bin/sh FILE='some_file.js' gsed -i -E 's/something/somethingelse/' "$FILE" echo "Modified File" When I run this from command line, it echoes the last line, so ...
0
votes
0answers
4k views

Single User Mode not starting

First of all, there's no firmware password or anything fancy. I'm trying to diagnose a late-2011 MacBook Pro 15", and I'm trying to get into the single user mode. I press and hold Cmd+S (the left Cmd, ...
2
votes
1answer
33 views

Is there a terminal emulator for Mac OS X that supports binding Ctrl+(Shift)+Tab?

I want to bind Ctrl+Tab to "\033[27;5;9~" and Ctrl+Shift+Tab to "\033[27;6;9~". Unless I am missing something, the default Mac OS X terminal emulator will not let you bind these key sequences to ...
2
votes
1answer
5k views

How to connect to a specific BSSID via Terminal?

My internet provider has a service where I share part of my wifi connection with other subscribers and in return I can use their wifi connection when I'm close to a subscribers router. It's very ...
5
votes
4answers
2k views

El Capitan - Right Click Menu - Open Terminal Here

I know this may have been asked several times, however I cannot find a valid method that will work for me. On El Capitan - I want to add a option to the right click menu (not the services section) ...
4
votes
1answer
57 views

Change font of Terminal programmatically w/o restarting

At home I've got a nice big display that unfortunately does not have the same resolution as my retina macbook does. I'd like to use a pixel-font on the low-res screen and a nice smooth one on the ...
0
votes
2answers
298 views

Slow mac when Terminal have been open for some time

When I have Terminal.app open for some time (mostly after 2-3 hours), everything starts getting slow. When I type there is a delay for each character, and all applications lag when I scroll. If I ...
5
votes
2answers
18k views

Is it possible to view passwords through Terminal?

Does anyone know how to view passwords in Terminal? Maybe by accessing the Keychain data or something? I want to be able to view passwords in Terminal with just a series of commands.
3
votes
1answer
37 views

Recognise command and colour it on the terminal?

I was wondering if it's possible to colour a recognised command in real time while typing and/or when switching to previous commands using the arrows. For example, if I start typing gre, it should ...
0
votes
1answer
77 views

Find all hidden files that were hidden using the command “chflags hidden filename”?

I remember to hide an important file, but I can't find it anymore and I don't remember the name. I don't remember how I hid it, i.e., if just by inserting a prefix of . or using chflags hidden ...
0
votes
1answer
275 views

Terminal - Crash at opening - pointer being freed was not allocated

I have an issue with my terminal since the installation of El Capitan. Every time i'm opening my terminal, this message appears and prevent me to using my terminal correctly : ...
13
votes
3answers
9k views

How can I delete saved commands from Terminal?

As all of you know, Mac OS X stores all commands that run from Terminal in Terminal itself, however, I want to delete (for example) the last 3 commands from the terminal. How can I do this?
0
votes
1answer
29 views

Terminal doesn't force quit

When I click Terminal in Launchpad, it says "The application Terminal is not open anymore." But it shows up in the Force Quit window and it has the open-app indicator on the dock. I can't quit the ...
0
votes
2answers
59 views

How to change how your Terminal app starts

When I launch my Terminal app, it starts in a Basic mode. I'd like to do a few things: Change default to "Pro" Control how Terminal is started .. For example, i'd like to either use my keyboard or ...
0
votes
1answer
31 views

My terminal background keep changing after each restart

I have this in my ~/.bash_profile export ANDROID_HOME=/Users/username/Library/Android/sdk export PATH=$ANDROID_HOME/platform-tools:$PATH export PATH=$ANDROID_HOME/tools:$PATH export ...
1
vote
1answer
46 views

Setting Terminal tab names in OS X and using vim

I regularly ssh into a Linux cluster from an OS X (El Capitan) Terminal, sometimes with multiple Terminal tabs. I use bash and vim. I'd like to do the following: while ssh'd, set the Terminal tab ...
1
vote
0answers
49 views

How to prevent terminal geometry changes when changing external display on MacBook Pro 13?

I have a MacBook Pro (Retina, 13-inch, Early 2015) that I use with Dell 2711 (at home) and 2713 (at work) external displays. Usually, but not always, when I bring my Mac from work to home, and vice ...
2
votes
2answers
80 views

How can I get iTerm 2 to copy only what I select?

iTerm2 has a very nasty habit of making an assumption of what I want to copy and paste from the terminal. Instead of just allowing me to copy exactly what I highlight, it will expand to what it ...
0
votes
1answer
5k views

Can't install Homebrew on MacBook Pro, password field won't input

I need to install Homebrew. I am unable to input the password when prompted in the Terminal - nothing happens when I type, only when I hit enter. I follow the instructions specified in the book I'm ...
-6
votes
4answers
32k views

How to press Control key on Mac

I cannot seem to find out how to hit the ctrl key on a Mac. When I open a terminal and I want to exit an editor such as nano as I cannot since I don't know how to exit and save. How would I do this? I ...
4
votes
4answers
9k views

How do I rename the Downloads folder (in Lion)?

For whatever perverse reasons I wish to rename the Downloads folder to Temp. I would also be happy with a way of making it appear to me, in both the GUI and the CLI, as Temp. I am aware I can do this ...
5
votes
2answers
7k views

How to create a VPN connection via terminal?

I have a macbook pro with mavericks running. I am looking for a way to connect to a VPN network in terminal. The reason why I want to do this is that I want to write a small program in Python which ...
1
vote
0answers
37 views

`scutil --nc start` not connecting PPPT VPN - OS X 10.11

From the answer to this question I have tried scutil --nc start 'us.justfreevpn.com' to connect a PPPT VPN, but all I get is the following popup: Frustratingly, if I manually start the connection ...
0
votes
0answers
47 views

False error Undefined property when debug php script in El Capitan

I have installed PHP and x-debug from homebrew in El Capitan: php -d xdebug.remote_enable=on -v PHP 5.6.18 (cli) (built: Feb 6 2016 06:53:53) Copyright (c) 1997-2016 The PHP Group Zend Engine ...
5
votes
2answers
10k views

How do I get Wi-Fi info from within Terminal?

Is there a way to get BSSID and the list of available Wi-Fi networks from within Terminal? I.e. I'm looking for something similar to ifconfig run0 scan on OpenBSD, which lists all access points, ...