To the headline question: Yes.
On an Intel Mac (I can't see why an M1 Mac would be different):
- My macOS 13 has
/bin/realpath.
- The executable has the same date and time as all other files in /usr/bin. Here is an
ls snippet.
-rwsr-xr-x 1 root wheel 203584 18 Oct 23:36 ps
-rwxr-xr-x 1 root wheel 134064 18 Oct 23:36 pwd
-rwxr-xr-x 1 root wheel 133840 18 Oct 23:36 realpath
-rwxr-xr-x 2 root wheel 135424 18 Oct 23:36 rm
-rwxr-xr-x 1 root wheel 133808 18 Oct 23:36 rmdir
/bin is only on the sealed system volume, so nothing apart from a macOS install or update could have put realpath in /bin.
- I am a homebrew user, but there is no homebrew version of
realpath:
% brew info realpath
Error: No available formula with the name "realpath".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
Note that it is true (see @nohillside's comment) that realpath can be installed by brew as part of coreutils. I suggest caution with coreutils because of the potential for name clashes.
@Barmar has commented above that realpath is in /bin on M1 Ventura.
I have a copy of all macOS 12 man pages. There is no man page for realpath. (This is a slightly indirect way of saying not present in Monterey).
There are new questions popping up on the web about realpath and Ventura. This also indicates that it was not installed previously.
I conclude that:
realpath is part of macOS 13 on both Intel and AS.
realpath was not in macOS 12.
realpath is not in homebrew as a distinct item.
realpath. – jaume Nov 04 '22 at 10:09/usr/local/bin/realpath– glenn jackman Nov 04 '22 at 13:35/opt/homebrew/bin/. – gidds Nov 04 '22 at 22:58/binor in/opt/homebrew/bin? Or somewhere else? – hippietrail Nov 05 '22 at 08:13/binbut not/opt/homebrew/bin. – Barmar Nov 05 '22 at 19:34/bin– Ezekiel Nov 06 '22 at 03:54realpathbinary? I'm not going to install XCode to find out, but it seems reasonable that it might? All three of my Monterey machines (1x M1, 2x Intel, all 12.6.1) do not have it. – Marc Wilson Nov 07 '22 at 14:59realpath, you can take a look runningls -1 /Library/Developer/CommandLineTools/usr/bin.realpathwas indeed introduced in macOS Ventura 13.0 – Aeronautix Oct 30 '23 at 08:51