Questions tagged [osx]

The command line and other Unix-like aspects of Apple's macOS (Mac OS X)

Apple's macOS (formerly known as Mac OS X) is a Unix variant built on a Mach/BSD-based kernel and FreeBSD-based userland. On this site, we cover the Unix-like aspects of the system, including the command-line interface, the filesystem, etc. Question about things that aren't Unix-like (including most of the graphical user interface) are covered at our sister site Ask Different.

See also if you're using/asking about the Darwin open source project.

1900 questions
108
votes
7 answers

Is Mac OS X UNIX?

I had this argument recently saying Mac OS X was not UNIX, but Unix-like. I know there is a Single Unix Specification and those spec compliant could use the UNIX trade mark. Is Mac OS X a UNIX operating system or is it a Unix-like?
OscarRyz
  • 1,275
10
votes
6 answers

Get OSX codename from command line

Is there a way to get OSX codename (I.e. Yosemite, El Capitan etc) from command line? I'm not looking for Version information (e.g. sw_vers -productVersion ) which gives 10.10 etc Thanks!
lviggiani
  • 3,579
5
votes
1 answer

Running an application with alternate/modified system time

I am looking for a way to start an application with an alternate system time than that which is set. Basically one of the beta programs I use has a bug (it really is a bug) that no longer lets it work past January 29th. Setting my system time to a…
rudolph9
  • 1,425
4
votes
3 answers

OSX: dd quits after a few minutes

I'm trying to diagnose a possible disk problem on my OSX machine: I heard some funny noises, so I decided to do a read test of the entire disk using dd. A few months ago this worked: dd would run for a couple of hours to read 750 GB, and then quit…
Hobbes
  • 143
4
votes
1 answer

Is there a way to integrate the unix "man pages" into OSX's Dictionary app?

I was thinking it would be cool to be able to look things up in the man pages the same way one looks up words with the "Dictionary" app. Is there a way to add the man pages that OSX supplies into the Dictionary app so when you right click on a…
Marty
  • 897
4
votes
1 answer

Mac: Any way to reduce memory usage of 'Terminal' app?

I have a fairly large number of terminals open -> exactly 9, but each one has from 4-12 tabs open. They have been open for a lengthy number of days. Now, I see on the Activity Monitor that the 'Terminal' app is using 9.38 GB of memory. I don't…
JoeG
  • 185
3
votes
1 answer

Disabling CNA in MacOS

I am doing some experiences/investigation into captive networks/the WISPr protocol. (see Getting WISPr tags from a FON authentication portal ) However, the Captive Network Assistant, "Captive Network Assistant.app", in MacOS, that is opened once…
Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
3
votes
0 answers

How can a mount command fail in one terminal window, but not in another?

On MacOSX 10.10.5, I opened a Terminal window, and did this: mount -t smbfs //accountname:password@server/path ./localdir and I got this error: mount_smbfs: mount error: /Users/accountname/localdir: Operation not supported by device This had been…
Almo
  • 183
3
votes
1 answer

How do I find the time elapsed, in ms, between one line of output to the next?

I am running a command on my OS which outputs thousands of lines, sometimes delaying in the middle for a couple of seconds, before restarting. Is there a way to find the time elapsed, in ms, between these lines of outputs? A time stamp would work…
3
votes
1 answer

How to change the default editor for a file type in Mac OSx?

The default editor for java files on my Mac seems to have been set to Xcode, but I want to change it to be the basic TextEditor. I've looked in preferences for the association, but it's not there. How do I change the default editor?
2
votes
2 answers

Return username of the user who just logged in within a login script

I'm writing a login script for OSX 10.8. I need to know the name of the user who logged in via the Login Window within a login script. I've tried "whoami", "$USER", and "ls -l /dev/console | awk '{print $3}'", but they all return "root". I assume…
MorganR
  • 123
2
votes
3 answers

Get Name of Computer Cross-platform?

I'm creating a login message for my computer inside of /etc/bashrc and would like to greet them to the computer with the computer's name showing. Here's my code: # (system stuff here) echo "Welcome, $(whoami)." When I use login on any user, it…
Nebula
  • 125
2
votes
1 answer

Cannot edit sudoers file - Cannot execute sudo

I cannot currently use sudo. I also cannot edit the etc/sudoers file because sudo does not recognize me. $ whomai myusername $ sudo visudo Password: myusername is not in the sudoers file. This incident will be reported $ su -…
steel
  • 375
2
votes
2 answers

Changed terminal permissions

For no known reason I suddenly have to execute most terminal commands using sudo. For example, I have always been able to run "git pull/push" etc. without any trouble. Now, I get "permission denied". Is there any way of resetting the permissions to…
user1337
  • 123
2
votes
0 answers

OS X: destroyfvkeyonstandby question

This is a very OS X specific question. I don't know if it applies to the rest of the Unix family. Sorry if this isn't the best forum for it, but the users here appear to be more knowledgeable in general than the superuser forum, and this is a tough…
1
2 3