Questions tagged [macos]

macOS (formerly known as OS X or Mac OS X) is the desktop operating system from Apple, found on Macintosh computers. Use this tag only if your question relates to using macOS APIs or macOS-specific behavior, not because you happen to run your code on macOS. Questions relating to using or troubleshooting macOS are off-topic and belong in the Ask Different community instead.

macOS (formerly known as OS X until 2016 and Mac OS X until 2012) is the desktop operating system from Apple Inc., found on Macintosh computers.

Use this tag for questions about writing and debugging programs on macOS. Questions relating to using or troubleshooting macOS are off-topic (use apple.stackexchange.com instead).

macOS() consists of a Mach/BSD-based kernel, operating system interfaces primarily based on FreeBSD (), and additional frameworks (written in C (), C++ (), Objective-C () and Swift () providing user interface and application-level services.

It was the successor to Mac OS 9. macOS is based upon the NeXTSTEP and OpenStep operating systems developed in the 1980s and 1990s by NeXT Inc., which Apple purchased in 1996.

Versions

  • Current macOS Big Sur
  • macOS Catalina 10.15.1
  • macOS Mojave 10.14.1
  • macOS High Sierra (10.13)
  • macOS Sierra (10.12)
  • OS X El Capitan (10.11)
  • OS X Yosemite (10.10)
  • OS X Mavericks (10.9)
  • OS X Mountain Lion (10.8)
  • OS X Lion (10.7)
  • OS X Snow Leopard (10.6)
  • OS X Leopard (10.5)
  • OS X Tiger (10.4)
  • OS X Panther (10.3)
  • OS X Jaguar (10.2)
  • OS X Cheetah (10.1)
  • OS X Puma (10.0)

More information:

107565 questions
2339
votes
24 answers

Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)

I updated to macOS Mojave (this happens on Catalina update too, and seems to potentially occur on every major update thereafter) This morning I navigated to my work's codebase in the Command Line on my MacBook pro, typed in "git status" in the…
dustbuster
  • 55,449
  • 4
  • 9
  • 31
2160
votes
34 answers

Find (and kill) process locking port 3000 on Mac

How do I find (and kill) processes that listen to/use my tcp ports? I'm on mac os x. Sometimes, after a crash or some bug, my rails app is locking port 3000. I can't find it using ps -ef... When doing rails server I get Address already in use -…
oma
  • 30,364
  • 11
  • 66
  • 91
1673
votes
21 answers

How do I install pip on macOS or OS X?

I spent most of the day yesterday searching for a clear answer for installing pip (package manager for Python). I can't find a good solution. How do I install it?
The System
  • 16,771
  • 3
  • 10
  • 3
1568
votes
17 answers

Who is listening on a given TCP port on Mac OS X?

On Linux, I can use netstat -pntl | grep $PORT or fuser -n tcp $PORT to find out which process (PID) is listening on the specified TCP port. How do I get the same information on Mac OS X?
pts
  • 64,123
  • 15
  • 92
  • 159
1406
votes
28 answers

How can I Remove .DS_Store files from a Git repository?

How can I remove those annoying Mac OS X .DS_Store files from a Git repository?
John Topley
  • 107,187
  • 45
  • 188
  • 235
1356
votes
46 answers

How to check for an active Internet connection on iOS or macOS?

I would like to check to see if I have an Internet connection on iOS using the Cocoa Touch libraries or on macOS using the Cocoa libraries. I came up with a way to do this using an NSURL. The way I did it seems a bit unreliable (because even Google…
Brock Woolf
  • 44,051
  • 47
  • 117
  • 143
1231
votes
73 answers

Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?

I'm trying to link a UILabel with an IBOutlet created in my class. My application is crashing with the following error. What does this mean? How can I fix it? *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason:…
Guillaume Dubois
  • 2,003
  • 3
  • 13
  • 4
1139
votes
28 answers

How to install Java 8 on Mac

Editors note: This question was asked in 2014, and the answers may be outdated. I want to do some programming with the latest JavaFX, which requires Java 8. I'm using IntelliJ 13 CE and Mac OS X 9 Mavericks. I ran Oracle's Java 8 installer, and…
user3763100
  • 11,688
  • 3
  • 10
  • 7
1081
votes
31 answers

Pipe to/from the clipboard in Bash script

Is it possible to pipe to/from the clipboard in Bash? Whether it is piping to/from a device handle or using an auxiliary application, I can't find anything. For example, if /dev/clip was a device linking to the clipboard we could do: cat /dev/clip …
moinudin
  • 117,949
  • 42
  • 185
  • 213
1061
votes
34 answers

How can I start PostgreSQL server on Mac OS X?

Final update: I had forgotten to run the initdb command. By running this command ps auxwww | grep postgres I see that postgres is not running > ps auxwww | grep postgres remcat 1789 0.0 0.0 2434892 480 s000 R+ 11:28PM 0:00.00…
Ramy
  • 17,760
  • 36
  • 94
  • 141
973
votes
29 answers

How to set or change the default Java (JDK) version on macOS?

How can you change the default version of Java on a mac?
Venkat
  • 9,857
  • 3
  • 11
  • 6
909
votes
21 answers

Git ignore file for Xcode projects

Which files should I include in .gitignore when using Git in conjunction with Xcode?
Hagelin
  • 15,641
  • 5
  • 27
  • 37
873
votes
31 answers

Setting environment variables on OS X

What is the proper way to modify environment variables like PATH in OS X? I've looked on Google a little bit and found three different files to edit: /etc/paths ~/.profile ~/.tcshrc I don't even have some of these files, and I'm pretty sure that…
Paul Wicks
  • 55,730
  • 52
  • 115
  • 144
813
votes
25 answers

Upgrade Node.js to the latest version on Mac OS

Currently I am using Node.js v0.6.16 on Mac OS X 10.7.4. Now I want to upgrade it to the latest Node.js v0.8.1. But after downloading and installing the latest package file from nodejs.org, I found that system is still using v0.6.16 instead of…
afterglowlee
  • 9,680
  • 5
  • 17
  • 23
810
votes
17 answers

How to move the cursor word by word in the OS X Terminal

I know the combination Ctrl+A to jump to the beginning of the current command, and Ctrl+E to jump to the end. But is there any way to jump word by word, like Alt+←/→ in Cocoa applications does?
Arne
1
2 3
99 100