Skip to main content

Questions tagged [command-line]

Using programs and commands that do not have a graphical user interface (GUI) but are rather controlled by typing text commands into a terminal program, or shell.

Filter by
Sorted by
Tagged with
1 vote
1 answer
114 views

Why is brew trying to install a dependency that is already installed?

Why does brew attempt to download a dependency (and fail) when that dependency is already installed? I'm trying to install a python bottle from homebrew on a system that does not have Internet access. ...
Michael Altfield's user avatar
1 vote
1 answer
89 views

Where are the TimeMachine Backup snapshots in Terminal on macOS Ventura?

I have set up a new Apple Silicon Mac and attached an external drive as Time Machine. The Time Machine drive I can see in Terminal as $ ls -1 /Volumes ... Persistently ... And in Finder I can in the ...
halloleo's user avatar
  • 1,407
0 votes
0 answers
26 views

How to force brew to install from local bottle (without git clone github.com/build/homebrew-deps)

My goal is the have brew skip trying to make calls to the Internet when installing local cached bottles. I have downloaded the brew bottles for python and the python module virtualenv. user@host ~ % ...
Michael Altfield's user avatar
1 vote
1 answer
102 views

Disabling services (daemons, agents) with launchctl

I want to get rid of some system services completely. I turned off sip with csrutil disable. Then following command sudo launchctl disable com.apple.cloudphotod Gave me an unexpected answer: ...
Andrew Orlow's user avatar
1 vote
0 answers
100 views

How can I use launchctl to send a signal to a service?

As you can already see in the text below and screenshot of the terminal, whenever I try to send a signal to a service I have given Not privileged to signal service. and Could not kickstart service &...
Gurhan Polat's user avatar
-1 votes
1 answer
44 views

Issue with running SH file [closed]

I am trying to run the file run.sh with the command sh run.sh However, I get the error of permission being denied whether I use sudo or not. shloakagrawal@shloaks-air EaglerGradle-1.0 % sudo sh run.sh ...
Buddy Agrawal's user avatar
8 votes
3 answers
528 views

Link command in terminal vs ln vs symbolic link (ln -s) differences between them?

I've learnt about aliases and symbolic links ages ago, but only recently learnt of the link command from symbolic link vs. alias Is the link command in terminal on my MacOS - version is Sonoma 14.4.1 ...
avenas8808's user avatar
1 vote
0 answers
31 views

Changing MacOS guest user settings via terminal

I'm currently attempting to set up some shared Mac devices with a guest user through an MDM (Kandji). Ideally, this needs to be done remotely, which can be done through the MacOS terminal. By default, ...
MrGarlic's user avatar
0 votes
0 answers
30 views

Column explanation for netstat open UDP sockets

When I run netstat -v -a -p udp to show the open UDP sockets, I get the following output(truncated): Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign ...
Garuno's user avatar
  • 61
0 votes
0 answers
15 views

Any way to add playlists with Apple Music streaming content to Apple Music library from command-line?

It's straightforward to add m3u playlists of locally-stored files to the Apple Music app from the command-line. Is there any way to create and add a playlist of streaming content to the library, for ...
ajkessel's user avatar
0 votes
1 answer
47 views

otool shows only single architecture for system fat binaries in macOS

File (cmd tool) shows /bin/ls is a fat binary on macOS (Sonoma 14.2.1 on Apple M1) and otool -f confirms that: % file /bin/ls /bin/ls: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-...
mrn's user avatar
  • 111
0 votes
1 answer
136 views

How to force brew to install from local formula (without internet access)

How can I tell brew to skip trying to make calls to the Internet when installing locally? I have downloaded the brew formula and bottle user@host ~ % ls wget-1.24.5.json wget-1.24.5.rb wget-1.24.5....
Michael Altfield's user avatar
1 vote
1 answer
31 views

Make a login/logout script in mac [duplicate]

What would be the best way to log login, logout and the user that is logging into the mac? I have some machines which I control from remote desktop. I want to monitor who is logging into them and what ...
Saikat Karmakar's user avatar
1 vote
1 answer
97 views

how to install SBCL on Apple Silicon without brew and without sudo / admin?

I have an Apple M1 macbook pro in which I want to use SBCL for Common Lisp but without homebrew. The official SBCL page says one way is to build SBCL from source, though you need to bootstrap that ...
xdavidliu's user avatar
  • 1,116
0 votes
0 answers
27 views

Enabling TrueColors in Apple MacBook Pro M2 with Alacritty

I'm trying Alacritty on MBP M2 connected to a Lenovo 4K monitor. I wanted to enable True Colors support as indicated as one of the salient features of the software. My minimal YAML configuration and ...
Inian's user avatar
  • 73
1 vote
0 answers
18 views

How to, from command line terminal, add system voices and download them in addition to selecting them as the default for MacOS Sonoma?

How to, from command line terminal, add system voices and download them in addition to selecting them as the default for MacOS Sonoma? How can I get access without coding to the plist that has the ...
Shyamal Chandra's user avatar
1 vote
1 answer
31 views

What happens to existing files when changing the mount points of volumes?

On 7/17/17 @bingbomboom asked this question about creating a permanent /etc/fstab entry for an external drive. My head spun thinking about this next question. Instead of hijacking its thread, I'm ...
The DOuGTrainer's user avatar
1 vote
0 answers
20 views

how can I find with mdfind a file which starts with DZ and ends with .zip [duplicate]

I want to find out with mdfind where on my file system a file is located that starts with DZ and ends with .zip. I tried mdfind -name 'DZ*.zip' but this does not return any results. How can I ask ...
halloleo's user avatar
  • 1,407
1 vote
1 answer
43 views

running app as a different user

I want to start app N as user U2 while logged in as user U1. The idea is U2 is less privilidged than U1, thus it would be safer to run suspicious apps. Is it possible? I tried su U2; cd /...
Earnest Frankly's user avatar
4 votes
2 answers
460 views

To copy a file and preserve its comment

Is it possible to copy an individual file and preserve its comment? Here is what I have tried. Nothing here works for me on macOS 14.3.1 and Zsh 5.9 (x86_64-apple-darwin23.0). cp file.txt file-copy....
jsx97's user avatar
  • 130
0 votes
1 answer
56 views

ls -g: 'man ls' says -g option has no effect, but it works

macOS 14.3, zsh 5.9 (x86_64-apple-darwin23.0). man ls: -g: This option has no effect. It is only available for compatibility with 4.3BSD, where it was used to display the group name in the long (-l) ...
jsx97's user avatar
  • 130
5 votes
3 answers
3k views

Did this command do anything to my Operating System?

I was just trying to type in this command: echo "export PATH=$PATH:~/Desktop/nand2tetris/tools" >> ~/.zshrc ; source ~/.zshrc But I got to echo "export PATH=$PATH:~/Des before I ...
AsianDora's user avatar
0 votes
1 answer
55 views

nano only opens the first file given on the command line

Setting up a new MacBook. I like to use pico, so I always remember to add export EDITOR=nano alias pico=nano alias pcio=nano alias pioc=nano to my .profile. But I'm still missing something that I ...
Quuxplusone's user avatar
2 votes
1 answer
69 views

cp, trailing slash, and copying to the same vs. to another directory

To copy a directory to another directory, the first directory should be written without the trailing slash: # example 1 # this command will copy dir1 to dir2 # (dir2 is preexisting) cp -Rip dir1 dir2/ ...
jsx97's user avatar
  • 130
14 votes
3 answers
1k views

How are directory contents determined in Finder?

Specifically I'm asking about the mechanism where Finder will show entries that do not exist in the directory on the filesystem as shown by the terminal. Example 1: /Applications shows App Store.app ...
MacBeth's user avatar
  • 141
0 votes
0 answers
19 views

tail: /var/log/snmpd.log: Operation not supported on socket

OS: MacOS Catalina I've already tried kill -s INT syslogd and logd and also loading and unloading snmpd but still cannot open the file: cat /var/log/snmpd.log cat: /var/log/snmpd.log: Connection ...
mariano-daniel's user avatar
0 votes
1 answer
72 views

Can somebody explain why two users are logged in?

Apparently in my terminal a new "user" appeared. (Sorry for my language but I'm not really familiar with terminals and this stuffs). What I mean is that in the upper part of my terminal, ...
Andrea's user avatar
  • 3
0 votes
0 answers
15 views

Terminal user@location is using AppleTV and not computer [duplicate]

I opened terminal this morning after I turned on my computer from a shut down. Normally the terminal starts with username@computerName. This time it's username@appleTVname. I can't figure out how to ...
christine's user avatar
2 votes
2 answers
93 views

Homebrew: How-To forbid a specific package to be installed?

Can I configure brew to never install a specific package even if it is required by another package I install? I do not want to accidentally install any software that has a dependency on Java, i.e. ...
Sybil's user avatar
  • 3,987
0 votes
0 answers
113 views

Two versions of ruby installed

It seems like I have two versions of ruby installed. (3.3.0 and 2.6.10.210) How to fix that? peter@mac ios % sudo gem update --system Password: Updating rubygems-update Fetching rubygems-update-3.5.6....
Grim's user avatar
  • 123
2 votes
2 answers
357 views

How do I restore a plist on another Mac?

I would like to transfer a configuration from one Mac to another using the defaults command within BASH. On one Mac, I can save the configuration by doing: defaults read edu.ucsd.cs.mmccrack.bibdesk &...
Jim L.'s user avatar
  • 540
1 vote
2 answers
221 views

Problems with Python on macos Ventura

So I updated my mac a while ago to ventura 13.3.1 and ever since it messed up my python path, I can't use Pycharm (it can't locate a valid interpreter path), and I can't use pip as well. When I try to ...
ClovisIRex's user avatar
0 votes
1 answer
186 views

How did my hostname change? Where can I see this change being made/what time it changed? [duplicate]

today I logged into my mac and opened zsh and had a big shock! Normally my terminal prompt is something like: sidharthghoshal@macbook-pro But today I found it was : sidharthghoshal@HaeLims-Air I don't ...
Sidharth Ghoshal's user avatar
0 votes
0 answers
16 views

Wrapper around ssh causes AppleEvent handler to fail

I have the script that I've pasted lower down in my path and named ssh. The idea is that it changes the colour of the terminal based on which host I'm ssh-ed into. This worked fine for a long time, ...
thornate's user avatar
  • 101
-1 votes
1 answer
41 views

Zabbix agent daemon does not pickup a PID

(I've searched similar cases and could not find any) I've installed Zabbix agent daemon for MacOS. I'm running it on Catalina. The daemon ran just fine on installation, however after a while it ...
mariano-daniel's user avatar
1 vote
2 answers
135 views

Does this `last` output from macOS terminal describe a remote access login to my computer?

My computer was up to some strange things. I used the "last" command to check login activity and this is the result. Not only have I never seen it before this, all of my previous logins were ...
IDoNotUnderstand's user avatar
5 votes
1 answer
975 views

Difference between cp and cp -rf

Could anybody explain is there any difference between cp some-file.txt some-folder and cp -rf some-file.txt some-folder on a Mac? I was told that cp -rf forces cp to overwrite existing files, but it ...
jsx97's user avatar
  • 130
3 votes
1 answer
292 views

Editing Privacy and Security settings via Terminal commands?

We've recently pushed an update for Teams to my userbase and with the switch from the "Classic" version to the "New" Teams users will need to go into System Settings > Privacy &...
aRog's user avatar
  • 31
2 votes
1 answer
75 views

How to move strings contained in results of `nettop` using text editor?

using sed, awk, ed, etc... how to save an output string into a variable and print in a different position? example output of nettop: iMac191 ~ nettop -l1 -n -J interface,state -p "$(/usr/bin/...
John's user avatar
  • 1,071
0 votes
2 answers
33 views

File with @ in permissions

I've done a bunch of searching and can't figure this out. I have a bash file I am trying to create and run, but the file keeps getting saved with an @ in the last position on the permissions: user@...
nihilon's user avatar
  • 133
0 votes
0 answers
25 views

MBAM1 Sonoma: homebrew update bricked all browsers - how to recover?

I am in quite a bit of hell right now. For ages I have not upgraded brave because for some reason it could not do it automatically. I always assumed this was due to macOS being wholly useless when it ...
ledawg's user avatar
  • 101
0 votes
2 answers
60 views

How to edit a binary executable CLI tool with a hex editor and still run it?

I'd like to edit a binary executable CLI tool with a hex editor, and still be able to run it afterwards. Currently, when I edit the file and then run it, I get "zsh: killed [cli tool]". The ...
Duane J's user avatar
  • 111
1 vote
0 answers
68 views

How to have MacOS finder show unmounted drives in sidebar?

I want to be able to always show my external drives on the sidebar even after they are unmounted so I can just click them to remount quickly. I feel like this is possible through a terminal command ...
LOVEFIRE's user avatar
0 votes
0 answers
45 views

Shortcuts - Run Shell Script - error with unix socket

Issue: Shortcuts app can't seem to talk directly to a unix socket. I get this error, "Error: Custom { kind: NotFound, error: "no socket found" }" when configured to execute: /usr/...
Hefeweizen's user avatar
0 votes
1 answer
54 views

partial unzip from terminal

had a crash a couple of years ago which resulted in a recovery from Backblaze (at the time). Just discovered I didn't fully recover. Still have 3 zips, I only need parts of. This is an example from ...
Fritz's user avatar
  • 21
1 vote
2 answers
100 views

Shell with mac key bindings

I want a shell where I can edit commands the same way I edit every other text on MacOs. Where shift left means "add letter to the left of cursor to selection" not "type the letter D&...
Earnest Frankly's user avatar
3 votes
1 answer
21 views

Creating User Accounts with Puppet/Missing ACLs

Currently we use Puppet in my environment to provision a user account seen here and here Recently we noticed on macOS 13 that the user account created were missing ACLs. I believe the missing ACLs are ...
Ryan Curran's user avatar
7 votes
4 answers
2k views

How to prevent accidental execution of potentially harmful commands (e.g. reboot)

I spend a lot of time in Terminal.app, and in iTerm2 - mostly using SSH connections to some Linux boxes. I'm used to issuing reboot commands to these Linux boxes, but earlier this evening I ...
Seamus's user avatar
  • 4,640
0 votes
1 answer
148 views

Can I tell if a hard drive is usable or fake?

I purchased a hard drive which looks like a fake (doesn’t mount when I plug it in, the label is suspicious). If there a way using terminal to know if it’s usable? Nothing mounts when I plug it in Disk ...
MicroMachine's user avatar
  • 3,914
0 votes
0 answers
46 views

opendiff not getting launched after `git mergetool`

When I try to do a git mergetool (after getting a merge conflict), I get that the merge.tool is not configured..., and Hit return to start merge resolution tool (opendiff): After pressing return, I ...
Atom's user avatar
  • 133

1
2
3 4 5
65