Skip to main content

Questions tagged [terminal]

Questions about the Terminal application or its terminal emulation should use this tag. Use **command-line** for questions about shells or command-line programs that do not specifically involve Terminal.

1,009 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8 votes
0 answers
4k views

rbenv not overriding default Ruby version

I used the thoughtbot laptop script to setup a new Macbook Air (OSX 10.10.5), but when I navigate within a Rails project that contains a .ruby-version file, running commands such as rails s returns an ...
Jayson Virissimo's user avatar
6 votes
0 answers
79 views

Is it possible to mark a folder in the iCloud drive folder as "never offload this"?

I can imagine that there might be an attribute that I could add using xattr, but I have no idea what that attribute would be.
Evert's user avatar
  • 191
6 votes
0 answers
949 views

Opening Safari with URL from terminal also opens URL in default browser (Chrome)

My OS is Big Sur 11.1 and when I run the following in Terminal: /usr/bin/open -a /Applications/Safari.app https://www.google.com ...Chrome, my default browser, opens first, quickly followed by Safari. ...
Anthony's user avatar
  • 363
6 votes
1 answer
707 views

Listing all applications that are actively listening through audio inputs

I would like to know if there is any way to use terminal to list all active applications that are listening to audio devices (built in microphones, usb mics, etc) via terminal. I already know about ...
yuwe's user avatar
  • 73
6 votes
0 answers
427 views

What are the different OS X clipboards

Everybody uses the general OS X clipboard, which can programmatically accessed with pbcopy -general and pbpaste -general. However I noticed that the manpage of pbcopy and pbpaste also mention: -find ...
hgiesel's user avatar
  • 203
6 votes
0 answers
10k views

Is there a way to clean up possibly invalid disks that only show up on Mac OS Recovery through ‘diskutil list’ in Terminal? Does Recovery use them?

Hopefully that question is clear enough, and hopefully this is just me being silly. When I boot into the Recovery Partition, go into Terminal, and run 'diskutil list', I get quite a few tiny and ...
Jake Lee's user avatar
5 votes
0 answers
461 views

How to set a particular virtual desktop's background using the Terminal or API on macOS 12?

When I create a new Space on macOS, I set the desktop background to an image associated with the task I will complete in the Space. Something like: % set-space-background monitor=1 space=2 ~/...
70by7's user avatar
  • 203
5 votes
1 answer
2k views

Removing old versions of XCode Command-Line Tools on macOS 12

I recently got a new M1 MacBook which I migrated to using Migration Assistant. As part of the migration, the old XCode command-line tools seem to have made their way over, install receipts and all; ...
fluffy's user avatar
  • 892
5 votes
0 answers
406 views

Easiest way to definitely, positively delete a file in macOS (10.14+) as root?

I have a 1TB main drive where ~400GB seemingly got stuck in /Volumes/Time Machine Backups/ after the 10.14 update. I managed to delete most of it, but some files and folders are extremely resilient ...
left4bread's user avatar
5 votes
0 answers
651 views

How to speed up window minimising in MacOS?

Minimising a window in MacOS takes too long for me. I sped up the dock autohiding by using these commands in Terminal: How can I make auto-hide/show for the dock faster? Surely there's a way to ...
Twirre's user avatar
  • 71
5 votes
0 answers
1k views

Why doesn't ps aux show *everything*?

I recently had a problem with sluggish computer and I live in the terminal, so for me, when something's running slow, "top -o cpu" and "ps aux" are my bread and butter. However, I recently came to ...
Michael Lang's user avatar
5 votes
1 answer
524 views

Open a bookmark in Safari from Terminal

I do online tutorials one at a time and in a Safari bookmark called Current I always update the address to my current tutorial. I want some terminal command which I can call to start Safari and open ...
displayName's user avatar
  • 2,670
5 votes
1 answer
440 views

Any way to write the Terminal scrollback history?

I would like to open a new tab in Terminal with custom scrollback history. The primary use-case is to "fork" an existing tab such that both tabs contain the same scrollback history, but more generally ...
TerminalUser's user avatar
4 votes
0 answers
293 views

Is there a way to access Apple's 2FA Verification Code via Terminal?

I would like to script accessing the built-in two factor authentication code that is accessed via System Preferences -> Passwords. One of the apps I use does not prompt for the 2FA code so each ...
CSProfK's user avatar
  • 41
4 votes
0 answers
559 views

macOS Focus: How to allow notifications from commandline apps

I use a small utility to notify me when a commandline application finishes (in this case https://github.com/variadico/noti, but there are various solutions for this). I also use the new Focus modes. ...
Tino's user avatar
  • 141
4 votes
0 answers
720 views

Open safari tab group from terminal

I want to open a particular safari tab group through the terminal I'm aware that open -a safari would open the safari app but it creates a new blank tab group and open -a safari <url> will ...
Farees Hussain's user avatar
4 votes
0 answers
1k views

How do I get iTerm2 to split a single session, Terminal-style?

In iTerm2, Cmd+D adds another pane in the window with a new session. Straightfoward, useful - but not what I want. In Terminal, I could use Cmd+D to split the window with the same session. Both ...
nameless's user avatar
4 votes
0 answers
611 views

How to stop Mac apps from automatically recognising phone numbers?

Whenever there's a string of a few numbers on my Mac, it recognises it as a phone number and tries to dial it (through FaceTime) every time I click it. Is there a way to stop this, either with System ...
Righter's user avatar
  • 164
4 votes
0 answers
286 views

How to get a shareable link to a file in iCloud by command line?

There is a way to share files on my iCloud, one by one, with a shareable link. It's badly named "Add People". I use it often to send files to my friends or family. When it's more files, I just zip ...
Honza Javorek's user avatar
4 votes
0 answers
1k views

How do I use ssh agent on MacOS Catalina like OS X El Capitan used to?

I recently upgraded from OS X El Capitan to MacOS Catalina. I am accustomed to keeping my login session open for an entire week, and I was able to use a passphrase-protected ssh key by entering the ...
dmaestro12's user avatar
4 votes
0 answers
494 views

Midnight Commander Exit from Working Directory doesn't return to same directory in Terminal

Upon exit from midnight commander(MC), terminal returns to default directory(users/username) instead of working directory in MC. Had tried creating alias mc='. /usr/share/mc/bin/mc-wrapper.sh but ...
ranjith's user avatar
  • 111
4 votes
0 answers
988 views

How to set default duration for new Calender events

When creating new calendar events in the Calendar application the duration of the event defaults to 60 min. In earlier version of macOS it apparently was possible to change this by running defaults ...
caseyjay's user avatar
4 votes
0 answers
234 views

updated os to mojave 10.14.5, now lsof is giving me errors with stat

I had a system update last Thursday and ever since I have been getting the errors below. I have tried reinstalling lsof via homebrew, upgrading bash, rebooting, but no luck. How do I even go about ...
Daniel Shchyokin's user avatar
4 votes
0 answers
4k views

Unable to erase disk with Terminal and Disk Utility, error -69877 "Couldn't open device"

I am referencing this question from another user: Unable to format / erase hard drive For some reason, this pesky Kingston drive I have does not want to erase on Disk Utility nor with the use of ...
Luis Manuel Campos's user avatar
4 votes
0 answers
802 views

How can I use Gatekeeper to block applications on my Mac?

Is there a way for me to create a blacklist of Applications that cannot be installed, or run after they have been installed, on OS X Sierra? I have tried to follow the directions outlined here: https:/...
Jim Jameson's user avatar
4 votes
0 answers
1k views

Rearrange Spaces via command line from the terminal emulator

TL;DR: I need to replace the dashboard with a terminal emulator. Hi. I need to 'rearrange spaces' so a terminal emulator gets first from the left before the desktop, where the dashboard used to be. ...
user6803's user avatar
4 votes
0 answers
1k views

Using ScreenSaverEngine with -background flag, does not open it in background

I have used this guide on Medium to use the screensaver as wallpaper. I just got a new iMac at work with macOS v10.13.6. and was intending to do the same. But running the command in terminal with -...
Han Che's user avatar
  • 141
4 votes
0 answers
361 views

Change Terminal in Dock to Show Open Windows Instead of Open Tabs

I heavily use Terminal.app as I am a software engineer. While working, I can have over a dozen terminal tabs open spread across multiple terminal windows. When I have this large amount of tabs open, ...
Andrew's user avatar
  • 151
4 votes
0 answers
3k views

Troubles with com.apple.cmio.AppleCameraAssistant

I've got a problem with the Daemon com.apple.cmio.AppleCameraAssistant. After some researches on my side, I've finally found the problem on why UserEventAgent took so much of my CPU. Because of this:...
kud's user avatar
  • 41
4 votes
0 answers
975 views

How to hide user accounts when starting up my Mac?

I would like to hide that Admin user. Command: sudo dscl . create /Users/admin IsHidden 1 only hides the user when logging out. But when I restart my computer and the launch screen pops up I can still ...
articga's user avatar
  • 141
4 votes
0 answers
90 views

Can't change permissions on new files

I have a laptop running 10.12.5. I copied a folder of photos from a DVD to the Desktop. Here's what happens next: I can open the folder on the desktop and see the files listed. I can see the ...
crmdgn's user avatar
  • 151
4 votes
0 answers
1k views

Difficulty finding Internet passwords on keychain using terminal security command

I am trying retrieve an internet password from the keychain but I always get back: security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain. ...despite the entry ...
chezearth's user avatar
4 votes
0 answers
4k views

Do cronjob run when the computer is asleep?

I have a macbook air running El Capitan. I wrote a few cronjob that appear to be running even when the computer is asleep. Is this correct, or is my computer not really in a sleep state?
Joff's user avatar
  • 376
4 votes
0 answers
360 views

Unable to start app built manually

I have create an application APP-py3.app stored in /Applications. The APP-py3.app contains the following files [F] and directories [D]: Contents [D]: Info.plist [F] MacOS [D]: script [F with rights -...
Guuk's user avatar
  • 324
4 votes
0 answers
168 views

Raw binary midi stream in terminal?

I want to be able to cat the device file of a raw binary input stream from a midi controller. In Ubuntu, the process to do this was something like cat /dev/dmmidi1. However, I do not see such a file ...
Peter Klipfel's user avatar
4 votes
0 answers
101 views

“l/” in shell creates a whitespace

Whenever I type l/ in terminal on OS X (Mavericks), it replaces it with a blank space. I can't seem to find any relevant problems or fixes on Google and I have no idea why this happens. For example, ...
Caleb Fetzer's user avatar
4 votes
0 answers
371 views

How can I revoke an applications access to keychain passwords from the command-line?

Applications can be granted permanent unprompted access to passwords. You can add and revoke these privileges using the Keychain Access utility. (See this answer) I'd like to be able to revoke from ...
Nathaniel Waisbrot's user avatar
4 votes
1 answer
1k views

macOS 11 Pyenv Python 3.9.0 Install Error

I am trying to install python 3.9.0 on macOS 11.0.1. I have the latest version of brew and the latest pyenv. sids@Sids-MacBook-Pro ~ % pyenv install 3.9.0 python-build: use [email protected] from homebrew ...
SidS's user avatar
  • 223
4 votes
1 answer
633 views

How to schedule run of .command file (bash)?

I have a bash script (saved as myfilename.command) and would like to schedule its run. I've tried to use Calendar event for this (which works fine with Automator scripts), but I get the following ...
LA_'s user avatar
  • 394
3 votes
1 answer
152 views

Undeleteable (dataless?) folder in MacOS: Permission denied, compressed chflag

I'm having a problem deleting a folder that was previously managed by Microsoft OneDrive. The folder is called "WP". I already tried: sudo, disabling SIP, removing chflags. ❯ csrutil status ...
tholu's user avatar
  • 331
3 votes
0 answers
108 views

How to avoid "You don't have the permission to view it" errors in Terminal

On Catalina I have the following problem: I get permission error on some files when I try to open them through Terminal. Take for example the file 1100_2022S2_final.pdf which resides in a folder past-...
halloleo's user avatar
  • 1,407
3 votes
0 answers
276 views

iTerm2 - Split and connect to same host

When splitting with Cmd+D, is it possible to have iTerm2 SSH to the same host as the previous pane? I'm looking for an option like is mentioned in the post iTerm2 - Split vertically with current ...
oxa11ce's user avatar
  • 31
3 votes
0 answers
650 views

Force reset system preferences cache

I'm trying to enable/disable time announcement feature that's present in Dock & Menu Bar > Clock > Announce the time with a shell script. When I read the plist file, I can see that it's set ...
abdusco's user avatar
  • 131
3 votes
2 answers
3k views

Change mouse settings via terminal

I want to reverse the scroll for my USB (Microsoft) mouse on MacOS Monterey. It works fine but the scroll wheel is backwards, and the tracking speed is slow. When I go to System Preference I see Wait ...
Kirk Broadhurst's user avatar
3 votes
0 answers
113 views

How to remove hard to delete files, automatically created after an update?

After an OS update you sometimes discover left-overs on your desktop, often named (Previously) Relocated Items. In my current case this was just an alias to X11R6 nested in several folders: /...
SeanJ's user avatar
  • 358
3 votes
1 answer
2k views

Automatic log each session from Terminal

Just moved off from windows into a Mac. I used to use Putty and it has a feature of logging sessions into a folder so everything that happens (stdin/out) goes also to a folder for historic record. I ...
Nir Ben Ezri's user avatar
3 votes
0 answers
2k views

Big Sur - How to restart the menu bar on Mac

https://www.idownloadblog.com/2015/02/24/restart-frozen-menu-bar-extras-mac/ does anyone know a working command for Big Sur? I tried this but doesn't look like it's working. Terminal and activity ...
Lacer's user avatar
  • 364
3 votes
0 answers
2k views

"client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0" - SSH error - MacOS 12

I'm getting the error client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0 during a ssh connection on the command line when the target host is known (already saved to the ...
denis's user avatar
  • 131
3 votes
0 answers
603 views

How can I add shells to the list in Run Shell Script in the Automator now that the .plist is on the read-only volume?

This question has what seems like a duplicate here, but I have an update. The answer to that question -- how to add a shell to Automator -- is to modify Shells.plist. Specifically: The list of these ...
Raydot's user avatar
  • 150
3 votes
0 answers
223 views

Garbled Terminal output

The text displayed and the cursor on Terminal is very often garbled or 'noisy', and this is across releases for as long as I can remember. That said, it seems worse on Big Sur. Symptoms: Suppose I've ...
Lucky's user avatar
  • 161

1
2 3 4 5
21