Questions tagged [mac-osx]

Mac OS X is an operating system from Apple Inc. It was the successor to Mac OS 9 and here the 'X' means 10. Mac OS X is based upon the NeXTSTEP and OpenStep OSes developed in the 1980s and 1990s by NeXT Inc., which Apple purchased in 1996.

Mac OS X consists of a Mach/BSD-based kernel, userland primarily based on FreeBSD, and additional frameworks (written in C, C++ and Objective-C) providing user interface and application-level services.

2393 questions
215
votes
15 answers

In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?

I need to test sub-domains on my localhost. How can I effectively have this result of adding *.localhost.com to my /etc/hosts/ file? If it's not possible, how do I work around this problem? I need to test wildcard sub-domains on my localserver. …
MikeN
  • 8,252
  • 5
  • 22
  • 18
188
votes
9 answers

How to start/stop/restart launchd services from the command line?

How do I restart, say for example my httpd or afpd, running any Mac OS X >= 10.5 (Leopard-), without having to use the GUI and go to System Preferences -> Sharing and unchecking/checking "Web Sharing"? I'm looking for the canonical equivalent to…
conny
  • 2,259
  • 2
  • 16
  • 14
108
votes
3 answers

Can Mac OS X be run inside Docker?

Can Mac OS X be run inside Docker? If so, any suggestion as to how? And would it be running headless, or there would be a possibility to connect to the GUI remotely?
simone
  • 1,281
  • 2
  • 10
  • 10
104
votes
8 answers

How do I set the global PATH environment variable on OS X?

I'd like to append to the global PATH environment variable on OS X so that all user shells and GUI applications get the same PATH environment. I know I can append to the path in shell startup scripts, but those settings are not inherited by GUI…
lajos
  • 1,315
  • 4
  • 14
  • 8
91
votes
6 answers

How do I create user accounts from the Terminal in Mac OS X 10.5?

I would like to be able to create new users in Mac OS X 10.5 remotely after ssh'ing into the machine. How do I do this?
JR Lawhorne
  • 1,201
  • 2
  • 11
  • 12
87
votes
7 answers

How to sort ps output by process start time?

Is there a way to sort ps output by process start time, so newest are either at the top or bottom ? On Linux ? On SysV5 ? On Mac ?
Dean Smith
  • 1,230
  • 2
  • 11
  • 13
82
votes
4 answers

How to reload default Mac OSX routing table without rebooting

Greetings, I'm using vpnc for a VPN client. I'm also doing some tricky things with route to make sure I can still access my local network, etc. etc. (the particulars here are not very important). Sometimes I get the routing table so jacked up I get…
Nate Murray
  • 973
  • 1
  • 7
  • 7
82
votes
11 answers

Where is my mysql log on OS X?

I checked /var/log and /usr/local/mysql and i can't seem to find the log. I am trying to troubleshoot an error establishing a database connection with a php function.
Tony
  • 4,053
  • 10
  • 34
  • 29
79
votes
4 answers

How can I find the path to an executable in OSX

Is there a command I can use to easily find the path to an executable? I'm looking for identify on my local machine - something like pwd? pwd identify => /usr/local/bin/identify
Codebeef
  • 1,369
  • 4
  • 18
  • 20
78
votes
9 answers

How to restart Nginx on Mac OS X?

I just installed Nginx on Mac OS X (thanks http://www.kevinworthington.com/nginx-mac-os-snow-leopard-2-minutes/), but how do I restart Nginx on Mac OS X? Thanks!
Laura Brown
  • 813
  • 1
  • 7
  • 5
77
votes
7 answers

zcat/gzcat works in linux, not on osx. general linux/osx compatibility

First the specific problem: In linux, I use zcat to list a .zip file. In osx, zcat seems to automatically append .Z to the file name. Various people suggest replacing zcat with gzcat; however, gzcat complains that the file is not in gzip format!…
user23398
  • 1,111
  • 3
  • 9
  • 14
75
votes
2 answers

Why is rsync skipping the main directory?

I'm trying to use rync locally (on a windows machine) to a remote server (my osx box) in order to test a remote deploy build script. I've done rsync before just fine between 2 linux servers, but I'm having problems now. Here is the output: $ rsync…
chrisan
  • 907
  • 1
  • 8
  • 12
74
votes
10 answers

Can I specify a port in an entry in my /etc/hosts on OS X?

Possible Duplicate: How to use DNS to redirect domain to specific port on my server I want to trick my browser into going to localhost:3000 instead of xyz.com. I went into /etc/hosts on OS X 10.5 and added the following entry: 127.0.0.1:3000…
Tony
  • 4,053
  • 10
  • 34
  • 29
73
votes
11 answers

Why is ssh agent forwarding not working?

In my own computer, running MacOSX, I have this in ~/.ssh/config Host * ForwardAgent yes Host b1 ForwardAgent yes b1 is a virtual machine running Ubuntu 12.04. I ssh to it like this: ssh pupeno@b1 and I get logged in without being asked for a…
Pablo
  • 7,249
  • 25
  • 68
  • 83
71
votes
7 answers

iptables equivalent for mac os x

I want to forward requests from 192.168.99.100:80 to 127.0.0.1:8000. This is how I'd do it in linux using iptables: iptables -t nat -A OUTPUT -p tcp --dport 80 -d 192.168.99.100 -j DNAT --to-destination 127.0.0.1:8000 How do I do the same thing in…
nafe
  • 1,241
  • 1
  • 10
  • 8
1
2 3
99 100