Terminal open command

So I’m trying to run a file in the recovery mode terminal but when I finally find the file I can’t use the open command. I had previously used it to open random files while exploring the terminal but it stopped working.


when I run

-bash-3.2# open README.txt


it returns

-bash: open: command not found

I searched the path and couldn’t find the open command even with the find function.


echo $path


/usr/local/bin:/usr/bin:/bin/usr/sbin:/sbin


I can’t find anything that will help and my best idea would be to make a new open command but I don’t want to mess anything up so help plz.

MacBook Pro 13″, macOS 10.15

Posted on Sep 4, 2020 5:13 PM

Reply

Similar questions

8 replies

Sep 4, 2020 10:27 PM in response to AnonymousNA

open won't work in this case because you're in recovery mode.


open acts by replicating what would happen if you double-clicked the file in a Finder window - i.e. search the directory for an application associated with .txt files (most likely TextEdit.app), and launch that application.


You can't launch GUI apps in recovery mode, so open is doomed to failure.


As noted, use cat to output the contents of the file to the terminal window, or use less if it's long and you want to page through.



Sep 5, 2020 9:12 AM in response to AnonymousNA

Easiest approach is booting as a guest in a hypervisor. I have run Kali Linux that way, using VirtualBox. Hypervisor installed on macOS, and the guests installed on whatever storage...


As for rEFInd? Not something I’ve tried recently. Maybe try these instructions:

https://rodsbooks.com/refind/sip.html


Absolutely have a backup of everything, as the expected outcome of all partitioning and re-partitioning efforts should be wholesale corruption. Hopefully you don’t meet one of those cases, but far too many folks have. And have lost much.

Sep 5, 2020 10:19 AM in response to AnonymousNA

AnonymousNA wrote:

So I’m trying to install refind because I want to be able to boot from an external Linux drive. But when I run the install script normally it says that my disk is encrypted (which it is) so I can’t install. It also says I can install if I reboot in recovery mode and run it from terminal.



You never state what exact Mac this is

or

what macOS you are currently running.



Macs with the T2 security chip, references:



About Startup Security Utility - Apple Support


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal open command

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.