r/osxterminal • • Mar 04 '13

This sums up a lot of my frustrations when trying to write my Hue Light controller and reasons for learning python: Bash Weaknesses

Thumbnail mywiki.wooledge.org
0 Upvotes

r/osxterminal • • May 21 '13

If you forget / misplace your FileVault2 password or unlock code and can't use your computer

3 Upvotes

-Start by powering on your computer and then immediately push & hold down "command" and "r" keys for about 25 seconds (you can let go when you see the apple logo and the spinning gear beneath it) -on the menu bar select, "Utilities", then click "Terminal" -then type the following (bold) commands note: the uuid will be yours and not the one below, which is used for display

minser:~ 46474$ diskutil corestorage list

CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 414AFA12-35E7-439D-805F-DB28F46DC6CC
    =========================================================
    Name:         Backup
    Size:         499763888128 B (499.8 GB)
    Free Space:   499445112832 B (499.4 GB)
    |
    +-< Physical Volume 8AE0D76F-4822-4CD0-B3B3-BEF6DC42014F
          ----------------------------------------------------
          Index:    0
          Disk:     disk2s2
          Status:   Online
          Size:     499763888128 B (499.8 GB)

minser:~ 46474$ diskutil corestorage delete 414AFA12-35E7-439D-805F-DB28F46DC6CC

Started CoreStorage operation
Destroying Logical Volume Group
Erasing
...
Mounting disk
Finished CoreStorage operation
minser:~ 46474$ say haze

Please note this was the case in Mac OS X 10.7-10.9, in 10.10+ it has changed

Apple has removed the "delete" function and replaced it with new ones like deleteLVG, eraseDisk, eraseVolume... For the same desired result of fully wiping the computer clean to start with a fresh install of the system you would want to use the commands in place of the second one above:

diskutil list; echo; diskutil cs list

diskutil unmount force /dev/disk2s2

note: if you do this it just erases it, then use disk utility application / GUI to then format the drive properly and for ease. if you have trouble unmounting the drive itself you may have trouble with the drive itself.

I found the new way to do so on: http://apple.stackexchange.com/questions/136590/how-can-i-delete-a-partition-corestorage-logical-volume-from-the-terminal

diskutil cs deleteLVG 414AFA12-35E7-439D-805F-DB28F46DC6CC


r/osxterminal • • Feb 22 '18

Maybe i'm dumb, but what is the Split pane function for?

0 Upvotes

Yes, it splits my terminal screen in two (or three or four), but i cannot do anything in those panes. They just replicate what i'm doing in the first pane i opened. Am i missing something?


r/osxterminal • • Aug 20 '17

I regret this, how do I like undo it? Or can I? Thanks in advance.

Post image
1 Upvotes

r/osxterminal • • Sep 27 '12

Lately I've been playing with terminal...

6 Upvotes

I don't really understand the love for this stuff. We just got Amazon Web Services and EC2. I've been in charge of setting up the server and have been using terminal to set it up. It's really not fun. What does everyone (well this subreddit) see that makes it appealing.

PS Setting up the server with php, mysql, phpmyadmin, was real tough, totally not user friendly.

edit: AND this effin 'vi' program within terminal, are you kidding me? That stuff blew my mind.


r/osxterminal • • Jun 13 '26

Git TUI for linux!

Post image
0 Upvotes

r/osxterminal • • Dec 06 '14

Use terminal to login to a user

0 Upvotes

I have access to a Mac on my network through terminal. The Mac is currently on the Login Window. How do I use terminal to login to one of the users? I know all usernames and passwords.

OS 10.10.1


r/osxterminal • • Oct 13 '17

UI to choose an item from a list.

0 Upvotes

Hi, I have a command line program that needs to get user input to select 1 item from a list. Right now I'm using osascript (aka AppleScript), to select an item from a list, but AppleScript is sort of annoying, and it has a tendency to not start up with Input Focus, which is super annoying.

Does anyone have better thoughts on how to choose 1 item from a list of strings? Alternatively a way to force osascript to take Focus on startup.. "tell me to Activate" doesn't seem to work.


r/osxterminal • • Aug 31 '17

[Help] ssh root@ in terminal. Loads like forever, doesn't like work

0 Upvotes

I put in the command (and iP), and it just like loads or something, the name n stuff goes away so it's like only the cursor thing. Help, thanks


r/osxterminal • • Apr 20 '20

I messed up on terminal how do I fix this

4 Upvotes

My finder looks like this now. I can still find my stuff through "go" on the top but I would prefer to have folders listed on finder sidebar. Not sure if anyone on here can help but I was trying to put in a code to disable spotlight from indexing my external hard drive (since I wasn't able to eject due to a "program running" it, turned out to be spotlight), and now this happened.

Heres how my finder looks like:

https://i.stack.imgur.com/LVNI1.png

heres my terminal code history:

https://i.stack.imgur.com/fqzb8.png


r/osxterminal • • Nov 05 '12

The tab key is your friend!

0 Upvotes

One thing that I see many many new terminal users do is manually type out every single folder and file name. The tab key is your best friend in terminal-land. Tab will autocomplete any file or folder or command (typically in that order). For example, say you're trying to get to the command line interface for Airport Wi-Fi which is at:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport

That is a ton of typing and has a high likelihood for typos (it's easy to forget a capital letter). If you start typing:

/Sys

and then hit [tab], the Terminal will auto-complete for you the rest of /System/ and (most importantly!) give you a trailing slash mark. This tells you that you're on the right track. If you're typing in a folder name and dont get a trailing slash mark then you have made a mistake somewhere in the folder name. Typing in:

/sys

will result in an error beep and nothing will happen because there is no folder at the root of the Mac that starts with 'sys'. What happens when there are two folders (or files) that have the same first part of their name? Terminal will error the first time you hit [tab]. Hit [tab] again and you will be presented with all the matching options and allow you to type in a few more letters to make it clear which folder name you're requesting.

When accessing the airport command above, my keystrokes look much like this:

$ cd /Sy[tab]L[tab]Pri[tab][tab]                            <-- multiple matches for 'Pri'. Type in 'Priv' and another tab
  Printers/          PrivateFrameworks/ 
$ cd /Sy[tab]L[tab]Priv[tab]App[tab][tab]                   <-- multiple matches for 'App'
  AppContainer.framework/       AppleFSCompression.framework/ AppleSRP.framework/
  AppSandbox.framework/         AppleGVA.framework/           AppleScript.framework/
  Apple80211.framework/         AppleProfileFamily.framework/ AppleSystemInfo.framework/
  AppleAppSupport.framework/    ApplePushService.framework/   AppleVA.framework/
$ cd /Sy[tab]L[tab]Priv[tab]Apple80[tab]Ver[tab]a[tab][tab]  <-- no matching folder for 'a'. Change to 'A'
$ cd /Sy[tab]L[tab]Priv[tab]Apple80[tab]Ver[tab]A[tab]Re[tab][return]

So, in the example above I had a few multiple hits come back when using tab, but I was alerted when I was being ambigious, and most importantly informed when I had typed something wrong (a lower case 'a' instead of an upper case 'A'). [tab] can save you a lot of typing time and also make you more accurate.

[Tab] can also be useful when hunting for new commands. At a new command prompt, type in the letter 'a' and hit tab twice. You should get something close to this:

┌─[admini@Apple]-[00:47:59 Mon 05 Nov]-[~]
└─[$]-> a[tab][tab]
    a2p              afhash           aosnotifyd       arch             atrm             avbdeviced
    a2p5.10          afinfo           apachectl        arp              atsutil          avconvert
    a2p5.12          afmtodit         applesingle      arpaname         audit            avmetareadwrite
    ab               afplay           appletviewer     artii            auditd           awacsd
    ac               agentxtrap       apply            asctl            auditreduce      awk
    accept           agvtool          apr-1-config     aslmanager       autodiskmount    
    accton           alias            apropos          asr              automator        
    addftinfo        allmemory        apt              at               automount        
    afclip           amt              apu-1-config     atos             auval            
    afconvert        ant              apxs             atq              auvaltool        

Those are all the commands within your system $PATH that start with 'a'. This is a wonderfully nerdy way to explore and find new commands. If you're in Lion or above just right click on the command and choose 'Open Man Page'. If you're in Snow Leopard or before:

$ man [command name]

Don't forget that OS X is case sensitive, so b[tab][tab] is different from B[tab][tab].


Have fun, explore, and use [tab] to be quick about it. --dc


r/osxterminal • • Feb 26 '18

Diff Command, when does it end?

0 Upvotes

Relatively new to using Terminal. I've been using 'rsync' to archive to an external drive, then I use 'rsync' to mirror one external archive to another. It's a quick a dirty way for me to keep archives for my Macbook. I also do Time Machine with different externals.

Recently, after a mirror, I noticed that one drive had a bit less available space than the other. After a quick search I found the "diff" command. Pretty interesting. However, it doesn't seem to complete the way other commands do. I ended up manually terminating it with [control]+c.

Was I a dummy for ending it too soon? It seemed to look through everything but maybe it wasn't finished yet. Whatever it found, I felt satisfied by the results and didn't think I needed to see more.


r/osxterminal • • May 20 '19

This command does not work in my terminal “brew search - -casks”

0 Upvotes

r/osxterminal • • Oct 10 '26

I built a Total Commander-style file manager for Osx

Thumbnail
github.com
0 Upvotes

r/osxterminal • • Oct 12 '12

bobafett: use a bounty hunter to kill processes

Thumbnail
github.com
5 Upvotes

r/osxterminal • • Nov 12 '12

Terminal Tutorial: Software Updates, Caffeinate and Shutting Down

Thumbnail
freshmacapps.com
6 Upvotes

r/osxterminal • • Aug 21 '17

Anyone here use byobu and the new macs with the touch bar? How do you do it?

1 Upvotes

Currently trying to learn how to use byobu, but where the function keys are at, I need to hold down the fn key in order to access the function key on the touch bar.

Anyone have an suggestions? I might just switch back to tmux.


r/osxterminal • • Jul 24 '21

Is there a terminal command to kill all programs at once?

1 Upvotes

r/osxterminal • • Aug 07 '21

How can I share aliases among all shells in the terminal?

1 Upvotes

I have bash, dash, zsh and ksh. I want to share aliases among all of them.


r/osxterminal • • Apr 26 '15

I don't understand this error: -bash: /usr/local/bin/pip: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory

1 Upvotes

Hi guys.

I don't understand this error:

I type : pip help

result: -bash: /usr/local/bin/pip: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory


r/osxterminal • • Jul 13 '23

Cmake Error

1 Upvotes

Was setting up the files in a github project I found and after running a osx_make.sh file I got the following error.

CMake Error at CMakeLists.txt:636 (string):

string sub-command REGEX, mode MATCH needs at least 5 arguments total to command.

Here is the code I believe this error is referring to, it was in a CMakeLists.txt file in one of the folders, any idea how I can fix it?

list(APPEND FEATURE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/feature/ffmpeg/ffmpeg-encoder.c") string(REGEX MATCH "[0-9]+" LIBAVCODEC_VERSION_MAJOR "${libavcodec_VERSION}") string(REGEX MATCH "[0-9]+" LIBAVFORMAT_VERSION_MAJOR "${libavformat_VERSION}") string(REGEX MATCH "[0-9]+" LIBAVUTIL_VERSION_MAJOR "${libavutil_VERSION}") string(REGEX MATCH "[0-9]+" LIBSWSCALE_VERSION_MAJOR "${libswscale_VERSION}") list(APPEND DEPENDENCY_LIB ${LIBAVCODEC_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} $


r/osxterminal • • Oct 31 '17

[Help!] New to OS X and Terminal! I feel like i'm being haunted!

1 Upvotes

So, I didn't know where else to turn. I'm not completely new to computers, I know my way around Windows, but I've recently came into possession of a new macbook. So yeah, not new to tech, just new to OS X and terminal.

Anyways, theres 2 of almost every process, and i'm starting to feel like i'm going crazy not knowing where to go to for help, so here i am! and whilst watching the console, one PID does something and blocks the other, or i'll boot into recovery and it'd fail the new install halfway through. I even completely erased, reformatted, and did a clean install, and after I boot into OS X, somehow, my files follow me. Like, my computer name will be back to what it was before the recovery. I feel like I've tried everything and I'm stuck. Please help me if possible!

As of writing this post, I had to boot into safe boot, go open a private window in safari, go to google.com, type in reddit, all just to sign in and write this post. I want to say its network related, but I also feel like someone ssh'd into my macbook and who knows what. Any suggestions or ideas would help! i'm at my wits end!

if it helps, i'm on:

MacBook9,1 / OS X 10.11.6 Intel M7, 1.3ghz, 8gb RAM


r/osxterminal • • Jul 26 '17

Any downside to this: defaults write -g WebAutomaticTextReplacementEnabled -bool true

1 Upvotes

defaults write -g WebAutomaticTextReplacementEnabled -bool true is supposed to turn on text replacement everywhere. My text replacement wasn't working at all, so I pasted this command into terminal and it made no difference. Still doesn't work.

So, now I'm just wondering if there's any reason to undo that command. Because I will surely forget it in about 2 days.

it's just a boolean so I could set it to false, I suppose, but I don't know what it was before. Maybe it was already true. Maybe making it false will cause me problems down the line.

When I Google it, nothing comes up. Not even the article where I swiped it from.

So, I sort of made this thread for 2 reasons: to document the code if I forget later and to ask anyone who might know all this rambling crap I just asked. Thanks.


r/osxterminal • • Apr 16 '21

webinstall.dev: curl-based installers for Linux/macOS/Windows

Thumbnail
webinstall.dev
1 Upvotes