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

1
vote
1answer
12 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 ...
2
votes
2answers
3k views

Open a new Safari window in the current Space from Terminal with multiple tabs (URLs)

How to open an new Safari window from Terminal in the current Space? Now when using the open http://example.com command it opened the URL as last tab on my first Safari window. I'm looking for a way ...
1
vote
2answers
392 views

CCID installation El Capitan

I am trying to install ccid-1.4.20 (command line) in an El Capitan enabled MacBook Air, but I am facing some issues. Instructions says that after uncompressing the file, in the generated folder I ...
0
votes
1answer
23 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
0answers
7 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
15 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 ...
5
votes
3answers
17k views

How do I force a partition and format on a USB key in OS X Mountain Lion Disk Utility or from CLI diskutil?

I have a brand new Memorex TravelDrive 64GB USB disk which is being troublesome. It's formatted FAT16 on MBR, which is not so nice, and I'd like to put it on HFS+. I've tried to do this through ...
1
vote
1answer
277 views

Symbolic link to Emacs 24 not working

I like to create a bin directory in my home directory and make it the first item in my $PATH. I then create symbolic links to override the default MacOS installed version of certain apps. I have done ...
3
votes
3answers
6k views

Process completed immediately after opening Terminal

After I open Terminal in OS X: Last login: Tue Oct 28 10:29:21 on ttys000 login(14773,0x7fff7572f300) malloc: * error for object 0x7fd4bb715110: pointer being freed was not allocated * set a ...
2
votes
1answer
123 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 ...
5
votes
5answers
2k views

Copy to clipboard from Tmux in El Capitan

I am quite happy with the Terminal changes in El Capitan (see e.g. this question). However, i can't figure out how to enable copying to system clipboard from within Tmux. For instance, now that I am ...
2
votes
3answers
25 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 ...
5
votes
1answer
341 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.
0
votes
1answer
15 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
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 ...
2
votes
1answer
33 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. ...
1
vote
0answers
17 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 ...
1
vote
1answer
24 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
0answers
20 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 ...
0
votes
2answers
23 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
0answers
10 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
14 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
votes
0answers
12 views

Process completed error on bash terminal [on hold]

On entering a command like this into my bash terminal echo "export PATH=$PATH:~/Desktop/nand2tetris/tools" >> ~/.bash_profile ; source ~/.bash_profile to load a hardware simulator using ...
7
votes
2answers
15k views

How to move the Downloads folder (in Mountain Lion) to another disc

I want the "Downloads" folder not on the system drive but on my second internal drive. In Lion I just deleted the "Downloads" folder and replace it with an alias with the same name (pointing to the ...
1
vote
1answer
43 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' ...
12
votes
5answers
62k views

“-bash: ls: command not found”

I installed the most recent update to OS X Lion (10.7). After I did that, my terminal won't recognize normal commands. I typed ls and got: -bash: ls: command not found I figured I'd try to add ...
1
vote
4answers
10k views

How to access the Wi-Fi password through Terminal?

I am at my school and the computer I am currently using is connected to a Wi-Fi network. I want to know the Wi-Fi password and I am on a Mac. I know there is a way to do it through Terminal. What I ...
1
vote
4answers
67 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. ...
1
vote
2answers
1k views

Install Monokai Theme on Terminal with prompt colors, etc.?

I already have a Monokai theme installed in Terminal, as so: I was wondering how I could get the rest of the Monokai (as Sublime uses) into Terminal? Like, making the prompt (Gamma@~) colored, etc. ...
1
vote
1answer
33 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 ...
2
votes
5answers
1k views

How to produce constant output in a Terminal window?

Like when you do brew install wget or mysqld restart I want some lines of information constantly run through my terminal window. Is there maybe something I can monitor or any stream of information I ...
116
votes
4answers
173k views
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 ...
2
votes
3answers
5k views

Alfred: How to get Alfred to run a terminal command?

I often need to run multiple copies of an app, like VLC. For this I use the terminal and run a command similar to: open -n /Applications/VLC.app How can I create a shortcut with Alfred to run this ...
0
votes
1answer
25 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 ...
1
vote
2answers
67 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 .. ...
1
vote
1answer
51 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
1answer
378 views

Full screen always enabled when opening app in OS X

How can I set my Macbook Air to always open new apps in full screen mode? Some apps already do it (Mail for example), but others are always opening as a small window, especially Safari when I close ...
1
vote
0answers
13 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. ...
10
votes
1answer
2k views

How to share history between terminal tabs?

I generally find myself using two or three tabs in my Terminal on OS X. A minor inconvenience is often that the tabs don't share a command history. So things like history | grep thingIamlooking for ...
3
votes
2answers
295 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 ...
7
votes
2answers
436 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 ...
59
votes
7answers
178k views

Is there an OS X terminal program that can access serial ports?

What programs can act as a terminal and access serial ports? This is not for terminal access on an IP connection, this is so I can access a hardware device plugged into a USB/serial converter running ...
100
votes
9answers
77k views

What is the difference between iTerm2 and Terminal?

I keep hearing that iTerm2 is much better than Terminal. I downloaded iTerm2 today and played around with it, but I couldn't see what is so much better about iTerm2. iTerm2 seemed just like Terminal. ...
1
vote
1answer
225 views

How to change the “Recovery HD” partition to type “Apple_Boot”?

Typing in the terminal diskutil list gives me this... /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme ...
0
votes
1answer
14 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
53 views

My Mac is slow after upgrading the OS

Recently, after upgrading to EL Captain, my terminal has slowed down way too much. Should I go back to my previous OS? My Mac has 4GB RAM and a 500GB HDD. Macbook Pro 13-inch. It has been one ...
2
votes
2answers
2k views

“xcode-select --install” versus retrieving the dmg from Apple's developer website

I would to ask a question closely related to already existing posts (How to install command line tools without error that is not currently available on Software Update server? and ...
1
vote
2answers
43 views

How to clone a damaged HD?

Been through a bit of the suggested answers, nothing has been suggested that I haven't tried (unsuccesfully, as of yet), so I turn to the group for answers. I have a 2.5" HD from an MacBook ...
0
votes
0answers
23 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 ...