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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Determining if Low Power Mode is Enabled/Disabled from Command Line · macOS 12.2.1 (Monterey)

According to this article the following script should return the current Power Mode state: pmset -g |grep lowpowermode This is what it actually returns in my case: When set through system ...
user avatar
  • 170
0 votes
1 answer
24 views

How can I see all available params in the commands for Finder, Dock etc?

I'm trying to build my own settings script with dotfiles, like this one https://github.com/driesvints/dotfiles/blob/main/.macos How can I see all the available parameters can be passed into defaults ...
user avatar
  • 103
0 votes
0 answers
15 views

How do I write to a plist with defaults?

I've been googling around, reading documentation, but for the love of me cannot really figure out how to write to plist files on Catalina using defaults. I can easily do these changes: defaults write ...
user avatar
2 votes
1 answer
53 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 ...
user avatar
0 votes
1 answer
42 views

How to use input variable in .zshrc alias?

I'm trying to create this alias: alias mrc="php artisan make:controller $(user_input) --resource" so that I can just type mrc ControllerName in the terminal to produce: php artisan make:...
user avatar
0 votes
1 answer
61 views

Most homebrew installed commands outputs "zsh: killed"

When I type brew, I get the output: zsh: killed brew Writing out the whole path still gives the same output, so it doesn't seem like a path problem. Furthermore, running /bin/bash gives the ...
user avatar
0 votes
0 answers
11 views

Terminal window spurious resizing with iPad (sidecar)

I'm using an iPad to extend the desktop on a Macbook Pro. Suppose I disconnect the iPad (either by asking nicely or because it the connection gets dropped). When reconnecting the iPad, Terminal ...
user avatar
  • 41
0 votes
1 answer
47 views

Shell command no longer working

I'm on a M1 MacBook Pro running macOS 12.3.1. I've had some AppleScripts that perform a shell script run happily for many years. For some unknown reason these have just stopped working today - nothing ...
user avatar
0 votes
0 answers
16 views

Creating a new user via terminal still showing as "unknown login"

I am trying to create a new user using the following command sudo dscl . create /users/paul3 UserShell /bin/bash UniqueID 1112 PrimaryGroupID 111 NFSHomeDirectory /users/paul3 sudo dscl . passwd /...
user avatar
  • 121
0 votes
0 answers
13 views

What might cause an app to open but not show any windows or errors?

When double-clicking an app, the app opens (in that the icon appears in the taskbar) but no windows appear, no errors, no notifications, etc. When running from Terminal, interestingly the binary runs ...
user avatar
0 votes
0 answers
9 views

How do I open Chrome with proxy for a specified profile on mac?

I'm trying to open Chrome with proxy for a specified profile on mac from terminal on mac, something like where "Profile 1" accesses sites via proxy while other Profiles doesn't. 127.0.0.1:...
user avatar
  • 89
0 votes
0 answers
43 views

Error installing semPlot package in RStudio

I'm on a MacOS (Monterey) I'm running RStudio v4.2.0. I ran install.packages("semPlot", dependencies = TRUE) successfully. I've trying to run library(semPlot) but I keep getting: Error: ...
user avatar
0 votes
0 answers
24 views

How do you prevent users on your network from configuring network interface connections on your network without your consent or knowledge?

As owner/admin of home wifi network with EERO Pro 6 router I'm seeing in macOS Monterey 12.3.1 interface network connections being configured without my consent or knowledge. What disturbs me besides ...
user avatar
  • 1
0 votes
0 answers
18 views

How to Disable gamecontrollerd Service?

I want to disable the service com.apple.GameController.gamecontrollerd. There is a thread on this topic here: https://discussions.apple.com/thread/252046047 However, the commands that are shown are ...
user avatar
  • 101
0 votes
0 answers
23 views

Is there a terminal command to change app icons?

Changing app icons in macOS keeps getting harder, especially since Big Sur where a lot of the best icon management apps no longer work, and the newer apps all seem a bit flakey and unreliable. Other ...
user avatar
  • 101
1 vote
0 answers
22 views

How to get memory consumption attributes of a processes in the shell/Terminal as per columns in Activity Monitor?

I have a process that I need to monitor somewhat frequently for growth due to it having a slow leak and the developer being quite unresponsive. (Not important, but since folks ask: This utility is ...
user avatar
  • 4,464
2 votes
1 answer
169 views

Open new application window via commandline

Background If you need a new window of an app you can right-click the app in the dock and click New Window. This is very tedious and takes away precious time. I'd like to have a shortcut for that. ...
user avatar
  • 141
0 votes
0 answers
38 views

Installer is getting failed while running post install script

The installer is getting failed while running the post-install script with error: *** Couldn't posix_spawn: error 2 We are importing the certificate in the post-install script for validation. ...
user avatar
1 vote
2 answers
32 views

Running the same commands on multiple remote hosts

I have the need to run some simple commands on multiple remote hosts, then view the output side by side. For example I might want to run: cd /var/log/server grep 'UUID: 12345-12345-12345' *.log Then ...
user avatar
  • 131
0 votes
1 answer
37 views

What are prerequisites for using perlbrew?

I want to send a Perl app I wrote to a simple Mac "end-user". He's running Monterey, but he isn't a Developer, he doesn't have Xcode, and I'm going to have to hand-hold him through using the ...
user avatar
  • 1,060
0 votes
0 answers
10 views

Close Terminal "New Remote Session" dialog automatically

When I select "New Remote Session" from Terminal's Shell menu, I can construct a command to connect to a SSH server. This works great! But, even after the session starts (I hit Enter or push ...
user avatar
2 votes
1 answer
66 views

How to export Time Machine exclusions or list them in Terminal

I have a Mac running Time Machine and it has dozens of exclusions that were added through the Time Machine UI. How can I export this list? Using tmutil in Terminal, I am able to access Time Machine ...
user avatar
0 votes
0 answers
18 views

Is there a command that I can run in Mac terminal to allow notifications for a specific app?

Is there a command that I can run in Mac terminal to allow notifications for a specific app? For example, I am trying to allow notifications for both Podcasts and Stocks but I do not see those apps in ...
user avatar
2 votes
2 answers
87 views

In Terminal, using the "touch" command to mass create consecutive files with leading zero's, with bash, produces different results than zsh

In Terminal, I prefer to use bash as my default shell. Issuing the command touch File_{01..10}.txt produces these results: File_1.txt, File_10.txt, File_2.txt, File_3.txt, File_4.txt, File_5.txt, ...
user avatar
  • 6,289
0 votes
0 answers
25 views

Scrolling issue in vim after switch to iterm2

On my MacBook (Monterey 12.3.1), I recently switched from the standard terminal to iterm2. However, I noticed some strange behavior when using vim in the new terminal. If I scrolled to the top of ...
user avatar
0 votes
0 answers
39 views

Mac Terminal shows "Ä" and "Å" characters instead of square or curly brackets

In my terminal, it is showing "Ä" and "Å" instead of {, }, [, and ]. I'm on OS X Monterey. It also looks like backticks are displaying as "é".
user avatar
  • 1
1 vote
2 answers
58 views

Is it safe to use `trash-cli` on macOS?

Introduction The program nnn has a send-to-trash functionality, and it uses trash-cli. I would like to use nnn and trash-cli on macOS. Reading trash-cli's homepage, I see it uses ~/.local/share/Trash/,...
user avatar
2 votes
0 answers
14 views

MAC OS Sierra 10.12.6 - does not accept region preference changes

For whatever reason, the region preference changed from Brazil to United States (Custom) and I cannot change it back to Brazil. The currency changed to USD and I can also not change it back to BR. The ...
user avatar
  • 21
1 vote
2 answers
59 views

Error while disabling csrutil on macOS Catalina

I've tried to disable csrutil on Catalina by booting and repeatedly hitting EDIT: cmd+R. I've run the terminal and disabled csrutil. I get the error "failed to modify system integrity ...
user avatar
  • 21
0 votes
0 answers
45 views

Shell Script to check password has been set to Immediately and what the screen saver time is set to

I need to create a script for checking a security posture of a machine using OPSWAT MetaAccess. They have a built-in check, however, according to them, they aren't able to check since macOS 10.13+. ...
user avatar
0 votes
0 answers
40 views

Automate renaming a part of a filename from another folder for versioning purposes

I have psd files in a folder which i have to output multiple crops, the crops creation are automated to come extent but i need to make sure my versioning is the same. Example Logic Get contents of '...
user avatar
0 votes
0 answers
27 views

Bioutil (Touch ID) shell script in shortcuts.app on MacOS don't work

I have a problem with bioutil function. In Terminal, I am using two commands which are working: sudo bioutil -ws -u 0 # disables TouchID for unlock sudo bioutil -ws -u 1 # enables TouchID for ...
user avatar
  • 1
0 votes
1 answer
11 views

Is it possible to set a per-profile HISTFILE in iTerm2?

Let's say I have a "Work" profile in iTerm2 and want to set a different HISTFILE for this profile, called .zsh_history_work, so that I don't see my work commands showing up in my regular ...
user avatar
  • 7,425
1 vote
2 answers
66 views

What is '<<EOS' in shell commands like 'osascript <<EOS'

In this post and one or two others I've seen things like: osascript <<EOS -- some AppleScript code EOS I expect it's part of bash and presumably other shells... or is it an AppleScript/...
user avatar
  • 378
0 votes
1 answer
45 views

Disable TimeMachine with AppleScript and Automator on Monterey?

I was using an App created with Automator to quikly disable and enable Time Machine backups on my Mac with just one click. I was using a command that for some reason seems to doesn't work since I ...
user avatar
0 votes
1 answer
29 views

My PS1 Customized Terminal Prompt doesn't work on MacOS [duplicate]

I moved from Windows and my customized terminal prompt doesn't work anymore, I'm trying to figure out the reason for that. It's not working in iTerm2 or RoyalTSX or Terminal. On windows: export PS1=&...
user avatar
  • 103
0 votes
1 answer
33 views

How to get the same date time in two formats in command line?

I have the following code DATETIME=$(date '+%F %T') GIT_TAG_DATETIME=$(date '+%Y%m%d-%H%M%S' --date="$DATETIME") to assign the same datetime in two vars in different formats. It works on ...
user avatar
  • 229
1 vote
2 answers
87 views

Is there anything like Windows systeminfo on macOS?

On Windows the systeminfo command is a quick way to get system information from the shell. Is there any command like that on macOS?
user avatar
  • 611
0 votes
0 answers
25 views

Why does setting my MAC address take two attempts?

I'm new to SE so I'm not sure if this is the correct site, but I am trying to change my MAC address to a fixed value on startup of macOS using zshell (bash should be similar or the same ). I oddly ...
user avatar
0 votes
0 answers
23 views

MacOS Installer's status signed by untrusted

Hello i have downloaded Multiple MacOs installers mojave,catalina,monterey when i run pkgutil --check-signature /Applications/Install\ macOS\ Catalina.app i get status signed by untrusted certificate ,...
user avatar
1 vote
0 answers
38 views

Cannot spoof MacOS version disabling SIP

I've been trying to spoof my Mac version because I need to install an app for school that doesn't support Mac OS Mojave. The application does not have a burned in Info.plist file so I cannot modify ...
user avatar
0 votes
0 answers
35 views

BASH vs Python? Is BASH slow? Or is it On-Site Server?

I'm fairly new to writing scripts, so this might be a really amateur question. My job consists of a lot of copy/sorting/downloading/indexing files on an on site server while I work from home. So ...
user avatar
0 votes
0 answers
7 views

Mojave Screensaver not reading defaults database

I work on a Mojave (10.14.6 (18G6032)) computer managed via JAMF and dislike the pushed screensaver. I'm able to change the screensaver via Prefs to Shell.saver but it resets to the pushed saver ...
user avatar
0 votes
1 answer
30 views

gpg-agent running but command line tools missing

When I was trying to configure my gpg-agent, there were was no command line tool i.e. /usr/local/bin/gpg-agent doesn't exist (nor does it exist in the other dirs in my PATH variable: /usr/local/bin:/...
user avatar
0 votes
1 answer
25 views

Cron job is python script not executing automatically altough cron and Terminal was added to full disk access

I set up a cron job for writing every minute from a python script an entry into a log file which is created from the python script. The python script is working fine if I execute it manually but it ...
user avatar
1 vote
1 answer
60 views

Force shutdown mac via terminal

I know I can shutdown a mac via terminal using sudo shutdown -h now But that is a graceful shutdown how can I force it to immediately die (I know this is bad practice) ditto for rebooting there doesn'...
user avatar
  • 123
0 votes
1 answer
45 views

Problems with searching in finder, spotlight and file-management on Mac

I got some problem with indexing of disk, Spotlight, searching in finder and file-management.(MacBook m1 2020) Finder is loading a lot of time, searching in it does not work, Spotlight does not work ...
user avatar
  • 1
1 vote
1 answer
43 views

How can I inspect the environment variables of a running process in Big Sur?

How can I see env vars of a running process? The solution from here doesn't seem to work: ➜ ~ TEST=test /bin/bash -c 'sleep 1000 && echo $TEST' & [1] 27677 ➜ ~ ps eww 27677 PID TT ...
user avatar
  • 51
1 vote
1 answer
44 views

tree Full Path Prefix not displayed

I have installed tree using homebrew, however it isn't behaving as expected. I have the following to list recursive files, but I want the full path for each file to be displayed. Unfortunately it's ...
user avatar
  • 159
0 votes
1 answer
54 views

How can I restore ssh on my mac?

I've broken ssh passwordless logins on MacA and MacB on my LAN. (Catalina and Monterey.) I wanted to write a simple, low-paranoia, no-understanding-required recipe for setting up passwordless ssh for ...
user avatar
  • 1,060

1
2 3 4 5
119