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

3
votes
2answers
47 views

How to Change USB Thumb icon using Terminal or Bash/other scripting language

I'm looking for a method to change USB or External Drive Icon using bash or any other command line method. I know how to manually chnage them like this I am using El Capitan
4
votes
2answers
77 views

Is there a way to control dual monitor relative position from terminal?

I have a weird setup for my home office that allows me to switch from a standing desk to a sitting desk. The only problem is that when I alternate positions, my laptop's external monitor switches ...
0
votes
0answers
39 views

In Terminal, how do I run a curl command to POST data?

I'm using OS X Yosemite and having trouble running curl to POST data to my local server. Below is the command I'm running and the response: localhost:myproject davea$ curl --header ...
0
votes
0answers
18 views

How to use SDL2 on OS X via Makefile? [migrated]

I have homebrew and its sdl2 package properly installed on OS X El Capitan, and the SDL2 headers are in /usr/local/include/SDL2, but when I use -lSDL2 in gcc and #include <SDL2/SDL.h> as in ...
1
vote
2answers
46 views

How can I switch to an open tab in Safari using osascript?

Trying to switch tabs in Safari with osascript. I have tried multiple versions of the following: osascript -e 'tell Application "Safari"' -e 'keystroke "2" using command down' -e 'end tell Tried ...
0
votes
1answer
14 views

Reverse SSH tunnel daemon

I own a Macintosh laptop (10.11.2) that I would like to create a permanent reverse SSH tunnel. This way, when I switch network, or the computer is stolen, I can remotely SSH into the device ...
0
votes
1answer
22 views

change screen resolution with AppleScript

How can I change change screen resolution using AppleScript? If AppleScript can't do it, what about Terminal? I tried with examples at How to set screen resolution with a keyboard shortcut on Retina ...
3
votes
1answer
148 views

OS X : Terminal command to turn ON/OFF SSH server

I know how to turn on SSH server from System preferences :- (System preferences -> Sharing -> Remote Login ) Now I am looking for a terminal command for the same. By knowing it I can use the ...
7
votes
1answer
442 views

How to get the geolocation of an IP address in Terminal?

Is it possible to get the geolocation of an IP address in Terminal? Not sure what the numbers in an IP address mean, but there must be some logic behind it, so lookup can't be that hard.
3
votes
3answers
31 views

Why does the Terminal app icon show an unread message?

For the first time in roughly three years, the Terminal app icon in the dock shows that red new message overlay. To the right, the same happens with Thunderbird which I am used to as I do have ...
-1
votes
0answers
13 views

Adding text to a png with OS X bash but without third-party installed? [duplicate]

$ convert -bash: convert: command not found $ gm -bash: gm: command not found Is it possible to make an OS X El Capitan bash script to add text to an image (a png), without installing ...
0
votes
1answer
39 views

How to change timezone in recovery mode? [duplicate]

I have a MacBook pro and I'm trying to instal OS X El Capitan on a clean formatted SSD hard drive. While installing I encounter an error saying "this copy of the instal os x el capitan application ...
1
vote
0answers
28 views

SSH keybased authentication using smartcard

I originally posted this on Information Security but am hoping to attract an answer here since this is OSX specific. So I'm fairly new to more secure forms of key management, I've been used to ...
3
votes
1answer
49 views

Add command to sudo in OS X - or how to fix a major security inconsistency in OS X

OS X provides Keychain Access, which is a great way to save passwords of varying apps and websites. When you want to view a password via the Keychain Access GUI, you are asked the admin password. ...
0
votes
0answers
35 views

Get result of Terminal tab do script via commandline

I've seen similar questions like this but none seem to deal with getting the result from a specific Terminal tab? I'm writing a Chrome extension to do some awesome stuff. Right now I'm just trying to ...
1
vote
1answer
31 views

The terminal on my Mac does not work anymore after installing Python & Sublime Text

I was trying to install Python3, and Sublime Text 3 in order to learn and run Python. Unfortunately, I watched some videos on youtube and tried to follow their instructions, I did something with my ...
0
votes
1answer
32 views

Can the cp command be used to restore a hard drive?

My cousin contacted me for tech support because her computer was refusing to boot to the startup drive, and the issue turned out to be a corrupted drive that Disk Utility refused to fix, telling us to ...
0
votes
2answers
42 views

prevent networksetup from asking for password

I am trying to get rid of password when changing proxy with networksetup. I changed permissions to read and write of /private/etc folder and propagated change to subfolders. I tried this: sudo chmod ...
0
votes
1answer
22 views

How to use GUI pinentry program for GPG

I would always like to use the GUI version of entering my GPG passphrase. Currently my pinentry program is set the same on my laptop as my desktop. But the desktop always asks for my passphrase on the ...
0
votes
0answers
24 views

Use Terminal to echo a Messages chat

What script/command could I use to echo a readable format of my messages with someone? Is there any way to echo the chat.db as a table for that one person who I am chatting with?
1
vote
1answer
68 views

Automator: “Run Shell Script” throws error because of missing “on” command

OSX 10.11.4 here. I'm trying to create a workflow for use with a hotkey, to run a simple shell script. Created via: Automator -> New Service -> Utilities -> Run Shell Script, then set to 'no input' ...
1
vote
1answer
54 views

How to avoid password prompt in terminal?

So sometimes my Mac loses its connection to the Internet. When I'm in front of it physically I can use the terminal and do the following to repair it: networksetup -setnetworkserviceenabled ...
1
vote
4answers
72 views

In Terminal, how can you determine which shell is actually running?

Using Terminal on OS X 10.11.4, initializing Terminal opens a new window running bash (by default). As I understand it, inputting echo $SHELL should output the shell that said command is submitted to. ...
0
votes
1answer
26 views

How to add shortcut to directories to OS X menubar

I have several directories that I want to quickly access in Terminal. And sometimes even in the finder. I would like to be able to hit an icon in the menu bar and have it drop-down a list of folders ...
0
votes
1answer
28 views

update git repository with apple script

I want to update my git Bitbucket online storage with apple script. This is the code that works in Terminal, but not when i run apple script. cd /Users/mainuser/Desktop/Projects git add -A git commit ...
1
vote
0answers
15 views

How to disable LoginWindow (boot to Darwin console)?

This may seem like an odd question, but it's one I've been wondering for quite a while. There is an old trick to get access to a console by typing >console as the username in the login window. ...
1
vote
1answer
55 views

No Macintosh HD in Volumes folder

I am running in recovery mode to save the data from disk( I cant login due to deletion of private/var folder). I opened Terminal and went to Volumes. This folder should be populated with the Macintosh ...
1
vote
2answers
91 views

Backup files from Terminal in Recovery Mode

I want to transfer files in Recovery Mode https://support.apple.com/en-us/HT201314. I opened Terminal in Recovery Mode and tried to copy files to external hard drive. I use this code // I used cd .. ...
7
votes
2answers
460 views

How do I swap Ctrl and Alt in just the Terminal?

I have a USB keyboard where I swapped my Cmd and Ctrl keys, because I come from the world of Linux and that's just what I'm used to. However, this causes a problem in the Terminal because all of a ...
3
votes
2answers
299 views

Terminal App: What comes after connection?

I want to use an SSH connection to upload large photo files to a server. FTP taking 10 minutes per photo. Someone suggested SSH; I have managed to get the computer connected to the server, but I ...
0
votes
1answer
21 views

Disable automatic “remind me on a day” in Reminders?

I use Reminders simply as a set of todo lists. Today I created a reminder to "buy a shirt, size 14-1/2 32/33", and Reminders added a due date of "2016-01-14 12:00" (not sure how it calculated that ...
0
votes
0answers
27 views

saving / restoring the NVRAM

I need to find a reliable way to save and restore the contents of NVRAM Would it be correct: Preservation nvram -x -p > ~/nvram.xml Recovery: sudo nvram -x -f ~/nvram.xml Thanks in advance ...
0
votes
1answer
18 views

How do I remove a ColorSync profile from a JPEG image from Terminal in El Capitan?

I have several images that I would like to strip the ColorSync profile from. Eventually, I would like to automate this in bash so I could easily process this on a file or folder from the contextual ...
-1
votes
1answer
19 views

Backing up data

I have a script that used to run daily that looked like the following to backup my mac. Backup script pastebin As you see here, this script is TERRIBLE because it deletes everything in the folder ...
1
vote
1answer
32 views

Set Computer to Sleep Mode for Specific Amount of Time from CLI

This terminal command sets the computer to sleep mode: osascript -e 'tell application "Finder" to sleep' How can I make the computer sleep for a specific amount of time, say 20 minutes? Do I need ...
0
votes
0answers
47 views

How to Have Stereo Macro in OS X Vim?

OS X Terminal Emulator with Custom Escape Sequences I am not sure if OS X terminal emulator is sufficient for the escape sequences. Current cursor on line of path in Vim etc ...
0
votes
0answers
37 views

Can I boost the Wi-Fi on my Mac in the Terminal?

I run Yosemite on my Mac. Recently the Bluetooth was skipping and I found an answer on here that said to run this command in Terminal, defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min ...
0
votes
1answer
26 views

How to execute app DVD through Terminal of recovery flash drive?

I have a Mac OS X 10.7 Lion recovery usb flash drive. It still boots but won't install Lion anymore (an error occurred during installation). I don't have a install DVD, however the MacBookPro's were ...
0
votes
1answer
28 views

Deleting password from Keychain in terminal

I'm having trouble deleting the github credentials from Keychain Access. Keychain Access just freezes everytime I try. Is there a command to force deletion of an item in the Keychain from the ...
0
votes
0answers
29 views

Encrypted Seagate 5TB External HD Unable to Mount

Been roaming informational posts all over the web about similar situations and I see it's a common issue but none of the solutions seem to work. This is my wife's external hard drive which she stores ...
1
vote
0answers
28 views

solution to easily embed skim notes doesn't work

My question is directly linked to the thread Make Skim save PDF's with embedded notes by default What if the proposed solution (http://apple.stackexchange.com/a/166794/180243) doesn't help? As ...
1
vote
1answer
24 views

How can I open a Terminal window directly from my current Terminal location?

Related to How can I open a Terminal window directly from my current Finder location?, I would like to have a terminal window open in one location, and open another one. E.g. under Linux, I could be ...
0
votes
1answer
24 views

Add a Proxy to your computer via terminal

How would I add and activate a proxy for my computer via terminal (without going into System Preferences.) Can I do that with scutil --proxy somehow?
0
votes
0answers
50 views

LSOpenURLsWithRole() failed with error -600 when opening html file from terminal

I created a new test.htm file in my homedir, and when I type open test.htm it switches to Firefox, just opens an empty tab (my file does not appear), and the terminal says: LSOpenURLsWithRole() ...
0
votes
0answers
17 views

how to 'custom install' with brew?

so I have to edit the install of wine, and apply a custom patch. The patch I want is here... https://bugs.winehq.org/attachment.cgi?id=38156 and when I add these lines with brew edit wine patch do ...
1
vote
1answer
34 views

Terminal - Weird spaces included when typing fast

Whenever I want to use the pipe operator in the terminal, I get a weird kind of "bug": As is shown in the image above, I can type the exact same command twice and it will sometimes register it or ...
0
votes
0answers
15 views

Changing MAC Address via Terminal not working? [duplicate]

I am an OS X 10.11 user following instructions to spoof my MAC address via Terminal. Everywhere I look seems to point to the following command: sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx With the ...
0
votes
1answer
23 views

Create custom Terminal shortcuts

I'm working a lot with SSH connections to servers, by for example forwarding localports or just establishing SSH connection to manage some servers. For this I would like to be able to create some ...
0
votes
3answers
77 views

How do I run a .sh or .command file in Terminal

I've always wanted to be able to run a script I've downloaded online directly from the Finder but just double clicking the file does not work.
0
votes
1answer
22 views

How to cd into my local git repo from an AppleScript?

I am running a Mac using OSX Yosemite v10.10.5. I want to push my local git repo to my remote using AppleScript. So the git code would be: shell git init git add README.md git commit -m "first ...