Sample of Mac Terminal Command in Recovery Mode

PCMacSample of Mac Terminal Command in Recovery Mode

This is a reference to the article Mac stuck on Gray Screen with apple logo during boot after installing macOS Sierra. These are the terminal command that I used in recovery mode when my Mac was unable to boot due to low disk space. I though of publishing the whole terminal commands output to those who have never used terminal or recovery mode to free up space on startup disk in case of no boot situation caused by low disk space or by some incompatible kernel extensions(.kext). This can be very helpful reference if your computer does’t boot normally and the safe mode does not work either. So the only option left for you is to use terminal in recovery to perform data backup and other troubleshooting. You can even copy data from internal hard drive ( user’s home folder ) to an external USB drive to save them.

Sample of Mac Terminal Command in Recovery Mode
Sample of Mac Terminal Command in Recovery Mode

Here are the complete list of terminal commands that I typed to free up some space on the startup disk.

-bash-3.2# cd /volumes
-bash-3.2# ls
OS X Base System    macOS High Sierra
Yosemite        macOS Sierra
-bash-3.2# cd “macOS Sierra”
-bash-3.2# ls
.DS_Store                Users
.DocumentRevisions-V100            Volumes
.PKInstallSandboxManager-SystemSoftware    bin
.Spotlight-V100                cores
.TemporaryItems                dev
.Trashes                etc
.file                    home
.fseventsd                installer.failurerequests
.hotfiles.btree                net
.vol                    private
Applications                sbin
Library                    tmp
Network                    usr
System                    var
Terminal Saved Output            vm
-bash-3.2# cd Users
-bash-3.2# ls
.localized    Guest        Shared        alisha        nasirsohail
-bash-3.2# cd nasirsohail
-bash-3.2# ls
.CFUserTextEncoding    Applications        Movies
.DS_Store        Desktop            Music
.Trash            Documents        Pictures
.bash_history        Downloads        Public
.bash_sessions        Library
-bash-3.2# cd library
-bash-3.2# ls
.DS_Store        Favorites        Network
.localized        FontCollections        Passes
Accounts        Fonts            Personas
Address Book Plug-Ins    GameKit            PreferencePanes
Application Scripts    Google            Preferences
Application Support    Group Containers    Printers
Assistant        IdentityServices    PubSub
Assistants        Input Methods        Safari
Audio            Internet Plug-Ins    Saved Application State
Autosave Information    Keyboard        Screen Savers
Caches            Keyboard Layouts    Services
Calendars        KeyboardServices    Sharing
CallServices        Keychains        Sounds
ColorPickers        LanguageModeling    Spelling
Colors            LaunchAgents        Suggestions
Compositions        Logs            SyncedPreferences
Containers        Mail            Voices
Cookies            Maps            WebKit
CoreData        Messages        com.apple.nsurlsessiond
CoreFollowUp        Metadata        iMovie
Dictionaries        Mobile Documents
-bash-3.2# rm -rf Logs 
-bash-3.2# ls
.DS_Store        Favorites        Passes
.localized        FontCollections        Personas
Accounts        Fonts            PreferencePanes
Address Book Plug-Ins    GameKit            Preferences
Application Scripts    Google            Printers
Application Support    Group Containers    PubSub
Assistant        IdentityServices    Safari
Assistants        Input Methods        Saved Application State
Audio            Internet Plug-Ins    Screen Savers
Autosave Information    Keyboard        Services
Caches            Keyboard Layouts    Sharing
Calendars        KeyboardServices    Sounds
CallServices        Keychains        Spelling
ColorPickers        LanguageModeling    Suggestions
Colors            LaunchAgents        SyncedPreferences
Compositions        Mail            Voices
Containers        Maps            WebKit
Cookies            Messages        com.apple.nsurlsessiond
CoreData        Metadata        iMovie
CoreFollowUp        Mobile Documents
Dictionaries        Network
-bash-3.2#rm -rf  Caches/*
-bash-3.2#cd ..
-bash-3.2# ls
.CFUserTextEncoding    Applications        Movies
.DS_Store        Desktop            Music
.Trash            Documents        Pictures
.bash_history        Downloads        Public
.bash_sessions        Library
-bash-3.2#cd Downloads
.DS_Store  Duplicate-Cleaner-to-Free-Up-Space.png
.localized
-bash-3.2# rm -rf Duplicate-Cleaner-to-Free-Up-Space.png
-bash-3.2# ls
.DS_Store  .localized
-bash-3.2# cd ..
-bash-3.2# cd Desktop
-bash-3.2# ls
.DS_Store
.localized
Content Blocking
Find-App-Install Date   Mac Screen Recording  Mac-Screen-Recording-With-Snagit.mp4
New Safari Feature High Sierra   Screen Shot 2017-09-04 at 3.12.15 PM.png  kextlist.txt
macOS High Sierra Feature  macOS High Sierra Public Beta
-bash-3.2# rm -rf Mac-Screen-Recording-With-Snagit.mp4
-bash-3.2# cd ..
-bash-3.2# ls
.CFUserTextEncoding    Applications        Movies
.DS_Store        Desktop            Music
.Trash            Documents        Pictures
.bash_history        Downloads        Public
.bash_sessions        Library
> -bash-3.2# cd ..
> -bash-3.2# cd ..
> -bash-3.2# cd ..
-bash-3.2# ls
.DS_Store                Users
.DocumentRevisions-V100            Volumes
.PKInstallSandboxManager-SystemSoftware    bin
.Spotlight-V100                cores
.TemporaryItems                dev
.Trashes                etc
.file                    home
.fseventsd                installer.failurerequests
.hotfiles.btree                net
.vol                    private
Applications                sbin
Library                    tmp
Network                    usr
System                    var
Terminal Saved Output            vm
-bash-3.2# cd Applications
-bash-3.2# ls
.DS_Store
.localized
App Store.app  Automator.app

Calculator.app   Calendar.app 
Chess.app   Contacts.app

Crocs World.app   DVD Player.app 
Dashboard.app   Dictionary.app  
FaceTime.app   Firefox.app 
Font Book.app  Gemini 2.app 
Google Chrome.app   HandBrake.app
Icecream Screen Recorder (Free Version).app  Image Capture.app
Install macOS High Sierra Beta.app Install macOS Sierra.app
Keynote.app Launchpad.app Mail.app 
Maps.app Messages.app
———-
———–
————-
—————-
-bash-3.2# rm -rf  “Icecream Screen Recorder (Free Version).app”
-bash-3.2# cd /Volumes/”macOS Sierra”/Users/replace_user_name

-bash-3.2# rm -rf .Trash/*

Moreover, you can refer to the article ” Your Startup Disk Is Almost Full ” message – How to fix it” if you want to delete files from more location to free up some more space. These were some sample command, there are various useful terminal command that you can use to perform multiple task. Feel free to share some useful terminal commands that you know, which can also be used in recovery mode.

In case your Mac is not booting or getting stuck at Apple logo with a loading bar which is caused by any problematic kernel extension(kext) files. Then type the following commands.

-bash-3.2# cd /Volumes
-bash-3.2# ls
OS X Base System macOS High Sierra
Yosemite macOS Sierra
-bash-3.2# cd “macOS Sierra”
-bash-3.2# ls
.DS_Store Users
.DocumentRevisions-V100 Volumes
.PKInstallSandboxManager-SystemSoftware bin
.Spotlight-V100 cores
.TemporaryItems dev
.Trashes etc
.file home
.fseventsd installer.failurerequests
.hotfiles.btree net
.vol private
Applications sbin
Library tmp
Network usr
System var
Terminal Saved Output vm

List of All the kernel Extensions (Kexts) and hardware drivers installed in macOS Sierra by default 

-bash-3.2# cd /System/Library/Extensions
-bash-3.2# ls
ALF.kext
AMD2400Controller.kext
AMD2600Controller.kext
AMD3800Controller.kext
AMD4600Controller.kext
AMD4800Controller.kext
AMD5000Controller.kext
AMD6000Controller.kext
AMD7000Controller.kext
AMD8000Controller.kext
AMD9000Controller.kext
AMD9510Controller.kext
AMDFramebuffer.kext
AMDLegacyFramebuffer.kext
AMDLegacySupport.kext
AMDMTLBronzeDriver.bundle
AMDRadeonVADriver.bundle
AMDRadeonX3000.kext
AMDRadeonX3000GLDriver.bundle
AMDRadeonX4000.kext
AMDRadeonX4000GLDriver.bundle
AMDRadeonX4100.kext
AMDShared.bundle
AMDSupport.kext
ATIRadeonX2000.kext
ATIRadeonX2000GA.plugin
ATIRadeonX2000GLDriver.bundle
ATIRadeonX2000VADriver.bundle
Apple16X50Serial.kext
AppleACPIPlatform.kext
AppleAHCIPort.kext
AppleAPIC.kext
AppleBacklight.kext
AppleBacklightExpert.kext
AppleBluetoothMultitouch.kext
AppleBluetoothRemote.kext
AppleBusPowerController.kext
AppleCameraInterface.kext
AppleCredentialManager.kext
AppleEFIRuntime.kext
AppleEmbeddedOSSupportHost.kext
AppleFDEKeyStore.kext
AppleFIVRDriver.kext
AppleFSCompressionTypeDataless.kext
AppleFSCompressionTypeZlib.kext
AppleFWAudio.kext
AppleFileSystemDriver.kext
AppleGraphicsControl.kext
AppleGraphicsPowerManagement.kext
AppleHDA.kext
AppleHIDALSService.kext
AppleHIDKeyboard.kext
AppleHIDMouse.kext
AppleHPET.kext
AppleHPM.kext
AppleHSSPIHIDDriver.kext
AppleHSSPISupport.kext
AppleHV.kext
AppleHWSensor.kext
AppleIRController.kext
AppleInputDeviceSupport.kext
AppleIntelBDWGraphics.kext
AppleIntelBDWGraphicsFramebuffer.kext
AppleIntelBDWGraphicsGLDriver.bundle
AppleIntelBDWGraphicsMTLDriver.bundle
AppleIntelBDWGraphicsVADriver.bundle
AppleIntelBDWGraphicsVAME.bundle
AppleIntelCPUPowerManagement.kext
AppleIntelCPUPowerManagementClient.kext
AppleIntelFramebufferAzul.kext
AppleIntelFramebufferCapri.kext
AppleIntelGraphicsShared.bundle
AppleIntelHD3000Graphics.kext
AppleIntelHD3000GraphicsGA.plugin
AppleIntelHD3000GraphicsGLDriver.bundle
AppleIntelHD3000GraphicsVADriver.bundle
AppleIntelHD4000Graphics.kext
AppleIntelHD4000GraphicsGLDriver.bundle
AppleIntelHD4000GraphicsMTLDriver.bundle
AppleIntelHD4000GraphicsVADriver.bundle
AppleIntelHD5000Graphics.kext
AppleIntelHD5000GraphicsGLDriver.bundle
AppleIntelHD5000GraphicsMTLDriver.bundle
AppleIntelHD5000GraphicsVADriver.bundle
AppleIntelHDGraphics.kext
AppleIntelHDGraphicsFB.kext
AppleIntelHDGraphicsGA.plugin
AppleIntelHDGraphicsGLDriver.bundle
AppleIntelHDGraphicsVADriver.bundle
AppleIntelHSWVA.bundle
AppleIntelIVBVA.bundle
AppleIntelLpssDmac.kext
AppleIntelLpssGspi.kext
AppleIntelLpssI2C.kext
AppleIntelLpssI2CController.kext
AppleIntelLpssSpiController.kext
AppleIntelLpssUARTCommon.kext
AppleIntelLpssUARTv0.kext
AppleIntelLpssUARTv1.kext
AppleIntelMCEReporter.kext
AppleIntelPCHPMC.kext
AppleIntelSKLGraphics.kext
AppleIntelSKLGraphicsFramebuffer.kext
AppleIntelSKLGraphicsGLDriver.bundle
AppleIntelSKLGraphicsMTLDriver.bundle
AppleIntelSKLGraphicsVADriver.bundle
AppleIntelSKLGraphicsVAME.bundle
AppleIntelSNBGraphicsFB.kext
AppleIntelSNBVA.bundle
AppleIntelSlowAdaptiveClocking.kext
AppleKextExcludeList.kext
AppleKeyStore.kext
AppleLPC.kext
AppleLSIFusionMPT.kext
AppleMCCSControl.kext
AppleMCP89RootPortPM.kext
AppleMIDIBluetoothDriver.plugin
AppleMIDIFWDriver.plugin
AppleMIDIIACDriver.plugin
AppleMIDIRTPDriver.plugin
AppleMIDIUSBDriver.plugin
AppleMatch.kext
AppleMikeyHIDDriver.kext
AppleMobileDevice.kext
AppleMobileFileIntegrity.kext
AppleMultitouchDriver.kext
AppleOSXUSBNCM.kext
AppleOSXWatchdog.kext
ApplePlatformEnabler.kext
AppleRAID.kext
AppleRAIDCard.kext
AppleRTC.kext
AppleSDXC.kext
AppleSMBIOS.kext
AppleSMBusController.kext
AppleSMBusPCI.kext
AppleSMC.kext
AppleSMCLMU.kext
AppleSRP.kext
AppleSSE.kext
AppleSmartBatteryManager.kext
AppleStorageDrivers.kext
AppleThunderboltDPAdapters.kext
AppleThunderboltEDMService.kext
AppleThunderboltIP.kext
AppleThunderboltNHI.kext
AppleThunderboltPCIAdapters.kext
AppleThunderboltUTDM.kext
AppleTopCase.kext
AppleTyMCEDriver.kext
AppleUSBACM.kext
AppleUSBAudio.kext
AppleUSBCDC.kext
AppleUSBDMM.kext
AppleUSBDisplays.kext
AppleUSBECM.kext
AppleUSBEEM.kext
AppleUSBEthernet.kext
AppleUSBEthernetHost.kext
AppleUSBFTDI.kext
AppleUSBMultitouch.kext
AppleUSBNCM.kext
AppleUSBNetworking.kext
AppleUSBTopCase.kext
AppleUSBWCM.kext
AppleUSBiBridge.kext
AppleUpstreamUserClient.kext
AppleVADriver.bundle
AppleWWANAutoEject.kext
AppleXsanScheme.kext
Apple_iSight.kext
AudioAUUC.kext
BootCache.kext
CellPhoneHelper.kext
CoreStorage.kext
DSACL.ppp
DSAuth.ppp
DVFamily.bundle
Dont Steal Mac OS X.kext
EAP-KRB.ppp
EAP-RSA.ppp
EAP-TLS.ppp
GeForce.kext
GeForceAIRPlugin.bundle
GeForceGA.plugin
GeForceGLDriver.bundle
GeForceMTLDriver.bundle
GeForceTesla.kext
GeForceTeslaGLDriver.bundle
GeForceTeslaVADriver.bundle
GeForceVADriver.bundle
HFS.kext
HFSEncodings.kext
IO80211Family.kext
IO80211FamilyV2.kext
IOACPIFamily.kext
IOAHCIFamily.kext
IOATAFamily.kext
IOAVBFamily.kext
IOAccelerator2D.plugin
IOAcceleratorFamily2.kext
IOAudioFamily.kext
IOBDStorageFamily.kext
IOBluetoothFamily.kext
IOBluetoothHIDDriver.kext
IOCDStorageFamily.kext
IODVDStorageFamily.kext
IOFireWireAVC.kext
IOFireWireFamily.kext
IOFireWireIP.kext
IOFireWireSBP2.kext
IOFireWireSerialBusProtocolTransport.kext
IOGraphicsFamily.kext
IOHDIXController.kext
IOHIDFamily.kext
IONDRVSupport.kext
IONVMeFamily.kext
IONetworkingFamily.kext
IOPCIFamily.kext
IOPlatformPluginFamily.kext
IOReportFamily.kext
IOSCSIArchitectureModelFamily.kext
IOSCSIParallelFamily.kext
IOSMBusFamily.kext
IOSerialFamily.kext
IOSkywalkFamily.kext
IOSlowAdaptiveClockingFamily.kext
IOStorageFamily.kext
IOStreamFamily.kext
IOSurface.kext
IOThunderboltFamily.kext
IOTimeSyncFamily.kext
IOUSBAttachedSCSI.kext
IOUSBFamily.kext
IOUSBHostFamily.kext
IOUSBMassStorageClass.kext
IOUSBMassStorageDriver.kext
IOUserEthernet.kext
IOVideoFamily.kext
KXLog.kext
KernelRelayHost.kext
L2TP.ppp
Libm.kext
NVDAGF100Hal.kext
NVDAGK100Hal.kext
NVDANV50HalTesla.kext
NVDAResman.kext
NVDAResmanTesla.kext
NVDAStartup.kext
NVMeSMARTLib.plugin
NVSMU.kext
OSvKernDSPLib.kext
PPP.kext
PPPSerial.ppp
PPPoE.ppp
PPTP.ppp
Quarantine.kext
Radius.ppp
SMARTLib.plugin
SMCMotionSensor.kext
Sandbox.kext
System.kext
TMSafetyNet.kext
TestDeviceVCOM.kext
TestDeviceVCOMACMControl.kext
TestDeviceVCOMACMData.kext
acfs.kext
acfsctl.kext
apfs.kext
autofs.kext
cd9660.kext
cddafs.kext
corecapture.kext
corecrypto.kext
exfat.kext
iPodDriver.kext
mcxalr.kext
msdosfs.kext
ntfs.kext
pmtelemetry.kext
pthread.kext
smbfs.kext
triggers.kext
udf.kext
vecLib.kext
webcontentfilter.kext
webdav_fs.kext
-bash-3.2#

If you see any other kext or driver apart from the above in your Mac then it must be a third party extension that you can safely remove or move to other location in order to prevent ir from loading at startup which may cause your Mac to stuck at grey screen with a loading bar.

These were the sample of Mac terminal command in recovery mode, which can be helpful or can be a great reference if you’re also troubleshooting your Mac and unable to boot normally. 

Nasir Sohail
Nasir Sohail
Nasir is a software engineer with an M.Sc. degree in software engineering and various certifications related to computer hardware and networking, such as MCSE, CCNA, RHCE. He has more than 15 years of mixed industry experience mostly related to IT Support, Web development and Server administration. He also offers his freelancing gig for IT support and consultancy and has more than 400 combined five-star reviews across platforms like Fiverr, Google, TrustPilot, etc.
Watch & Subscribe Our YouTube Channel
YouTube Subscribe Button

Latest From Hawkdive

You May like these Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.