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
1 answer
35 views

Accidental SSH to address

Usually when I am doing some development on my mac, I ssh into a virtual machine running on my computer at a 172 address. However, when I was ssh ing into it today, I accidentally mistyped the address ...
0 votes
0 answers
8 views

Can't kill annoying "Player Location" process

I've tried force quitting, using Terminal commands like kill -9, sudokill, killall, etc. without luck. After I try killing it, the PID number changes but the process remains. I can't open the program ...
1 vote
2 answers
334 views

Missing Courier font on Terminal macOS Monterey

I recently got a new laptop, opened up Terminal and noticed that the Courier font is missing entirely! Is there a way to get this font installed into Terminal? Thanks!
0 votes
1 answer
220 views

Unity: How can I run Unity builds created in High Sierra & Verify they run on Mojave without a Mojave computer?

I have Unity 2020.3.0f1 Mac apps that were created on end-of-life High Sierra computers. I recently purchased a Mac Mini M1 computer. The apps run on both computers. I have to execute a terminal ...
1 vote
1 answer
41 views

rsync listing directory with no changes

I have been trying to figure out this rsync behavior, where it still lists directories with different timestamps and the same sizes despite providing a --size-only flag. # lists some directory without ...
1 vote
0 answers
24 views

Why does my Mac Pro's hostname keep changing to 'HUAWEI_Y6_2019-...'?

My MacBook Pro (running BigSur 11.2.1) now - since I rebooted it last night - keeps showing the host name as 'HUAWEI_Y6_2019-{hhhhhhhhhh}' in the bash prompt. (The hh's are a 10-digit hex string.) ...
1 vote
1 answer
85 views

ghost files—now you see 'em, now you don't?

Ghost files—I don't know what else to call them. I have an external drive which the system refuses to make writable. Most of the files on it are already on my internal drive. To save time and space, ...
0 votes
1 answer
22 views

Autocompletion when browsing ssh server in zsh

i realized that my zsh does not autocomplete the folders of a SSH server when I am in a local terminal and use cd, rsync or any other command. The bash in Ubuntu does this. e.g.: rsync -avh --progress ...
1 vote
0 answers
29 views

Cannot copy folder in "Documents and Desktop" folders linked with iCloud Drive

I hope this frustration will not occur to any of you. But if it did and you may have a solution for it, please give me a hint. I am using a MacBook Air (M1, 2020) with macOS Monterey Version 12.5 (...
23 votes
4 answers
17k views

Change file association in terminal?

Is there a method for associating file types with applications via terminal? I thought ~/Library/Preferences/com.apple.launchservices.plist might do it, and I also have seen: Why is a command line ...
6 votes
2 answers
2k views

How to prevent Terminal window from changing its size after opening and closing tab

Each time I open and close new tab in Terminal app, the size of window "shrinks" by one line, until it reaches 5 lines, where it stops shrinking at last. I can literally keep repeating sequence ⌘+T ...
0 votes
0 answers
28 views

Opening a default amount of panes with default sizes in iTerm2

I am making the switch from VSCode to NeoVim and have finished setting up NeoVim. However, I am now trying to set it up so that whenever I open iTerm2 it launches a two vertically split panes. The ...
0 votes
1 answer
209 views

prompt not showing on terminal

I installed jdk and somehow modified my path and now my terminal no longer has a prompt, it just says "Last login: Wed Jul 14 15:28:10 on console" I created another user on my mac and that ...
3 votes
1 answer
538 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; ...
0 votes
1 answer
30 views

Output clickable link in ZSH

I want to echo a clickable URL on ZSH/Terminal. The URL corresponds to a Kibana-query, which means it includes lots of funky characters. For technical reasons, I cannot use "shortened" ...
6 votes
3 answers
8k views

Command to find out the version number of a .pkg file

Does anyone know how to retrieve the version number of a .pkg file which isn't installed yet? I'd like to use something like pkgutil --pkg-info, but that only works for installed packages. I've ...
1 vote
1 answer
28 views

Hot to call emacs within terminal.app from applescript when passing a file reference?

I have been trying to make the below script work in mac Catalina with emacs installed via homebrew. on open location this_URL set EC to "/usr/local/bin/emacsclient --no-wait " set ...
1 vote
1 answer
658 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 ...
3 votes
3 answers
4k views

What is the TERM_PROGRAM and TERM_PROGRAM_VERSION environment variables used for?

After running: env ; #from with in terminal I see the following output: TERM_PROGRAM=Apple_Terminal ;#Not sure Terminal.app TERM_PROGRAM_VERSION=273 ;#The CFBundleVersion of Terminal.app TERM=...
0 votes
1 answer
36 views

How to make Terminal forget all old open windows when quit?

This is not exactly the question asked here, but the end result is the same that I am trying to solve. I have terminal set (Settings, Shell tab) to "Close the window" when the shell exits, ...
0 votes
2 answers
1k views

Terminal command to reset USB-C ports on Macs

Is there a terminal command that resets the USB port without having to unplug and plug the device? Sometimes my USB hub (HDMI, Ethernet, USB3) malfunctions, and the only fix is to unplug/plug or ...
0 votes
1 answer
80 views

Getting extra character when copy string to iTerm

I'm using iTerm and when when pasting some string I've just copied from the terminal command prompt, I get some extra characters on prefix and suffix that match 00~ and 01~ respectively. I.e. I've ...
0 votes
0 answers
21 views

Any floating terminal apps for mac?

Are there any mac apps for a floating mini terminal near the cursor? Similar to the hotkey window for iterm2, but smaller and floating wherever the cursor is.
15 votes
7 answers
17k views

Monitor a folder for changes, and run a command when a change is detected

Is there a simple way to automatically run a (Terminal) command every time a file is changed in a specific folder? This should be possible via the command line, or a system built-in application, no ...
1 vote
1 answer
40 views

How to change the created/modified/access dates on a folder of files?

I took a bunch of vacation photos and didn't realize that the camera date was incorrect. The photos all start at Dec 31, 2012 11:00pm, whereas they should start at June 28, 2022 11:42am. I've looked ...
0 votes
0 answers
18 views

How can I use graphical "sudo" as a pam module?

I use Touch ID for sudo (pam_tid.so), and Apple Watch for sudo (pam_watchid.so). They allow sudo to authenticate us with new windows because they are pam modules. When both authenticate methods cannot ...
0 votes
2 answers
22 views

Using terminal (ie, zsh), I want to run a certain shell command, every time, any file in a given folder is saved/added [duplicate]

Hence, in a certain folder, say ~/Desktop/foo, any time a file/subfile/folder is touched (added, saved), I want to just run a certain command in the shell. Is there a way to do this, either with a zsh ...
0 votes
1 answer
31 views

Strange Terminal behavior "[Process completed]"

After migrating my Macbook Air M1 to my new Macbook Air M2 using the Migration Assistant, my zsh Terminal seems broken in a strange way. The terminal is set to run the script ~/.zshrc on startup. This ...
3 votes
1 answer
510 views

How to open the Apple URL protocol x-man-page:// in iTerm and not Terminal (default)

Apple has some custom URLs defined and one of them is x-man-page. If you open a particular man page with it, it displays it in a nice yellow window (a provided profile for Terminal) with black text. ...
0 votes
0 answers
46 views

What is the recommended shebang for macOS ZSH scripts? [closed]

Should I start my ZSH scripts with #!/usr/bin/env zsh, or #!/bin/zsh, or what? This seems like a very Google-able problem, but I haven't been able to find any information of what's the best option.
4 votes
1 answer
800 views

how dangerous is it to give zsh full disk access?

I have a shell script that runs a few (Duplicacy) backup commands. It works fine when I manually run the script from terminal (cd to the directory where it is and then ./backup.sh). To make it run ...
4 votes
0 answers
98 views

Unable to SSH to other servers after Monterey 12.5 upgrade [duplicate]

For some reason ssh connections from my computer to other devices do not seem to work after OSx upgrade, have already restarted it, shut down, started it back up. Do not see anything being blocked ...
0 votes
1 answer
60 views

Numeric Keypad on Extended Keyboard Doesn't Work in Terminal and There's No NumLock Key

When the Terminal window is in focus, pressing any of the numeric keys (0-9, the . key or the enter key ) generates a beep.
0 votes
0 answers
14 views

How can I fix a dialog when installing a New Version of Maxima Over an Older Version?

I previously used an old version of Maxima, but since migrating my old Mac to my new M1 Mac, the binary would not launch. So I used 'AppCleaner' to remove all support files and binaries for Maxima, ...
6 votes
2 answers
10k views

ss (netstat alternative) for OS X

How do I install ss on OS X? I couldn't find the iproute package in homebrew. Red Hat recommends ss over netstat in Red Hat Enterprise Linux 7. ss is provided by the iproute package. Red Hat ...
-1 votes
0 answers
37 views

Downloading homebrew along with oh my zsh. Somewhere along the way I got this permanent text in iterm. wondering how to get this off when open iterm [closed]

Example usage: brew search TEXT|/REGEX/ brew info [FORMULA|CASK...] brew install FORMULA|CASK... brew update brew upgrade [FORMULA|CASK...] brew uninstall FORMULA|CASK... brew list [FORMULA|CASK...] ...
0 votes
1 answer
62 views

While using bash on macOS, why is it necessary to use the "open" command to launch the firefox application?

I am new to macOS. Also, I am using Apple Macbook Air M1 Monterey 12.5. Before buying this Mac, I was using Linux (NixOS and Ubuntu) for several years. In Linux, while using bash, I was able to open ...
0 votes
0 answers
13 views

Consistent and robust options to convert ICNS files to PNG in macOS?

I've been having a terrible time getting sips and/or ImageMagick (convert) to consistently convert .icns files to .png. I frequently hit very unclear errors when using sips to make the conversion (eg, ...
0 votes
0 answers
10 views

Finder freezes after viewing m2ts files

I have a blu-ray file whose filesystem is saved as a .iso file. I open up the iso and navigate to the folder with all the video files to run ffmpeg tasks on them. After I'm done with that I try to ...
0 votes
0 answers
15 views

How do you limit upload speed/usage for a Terminal process on Mac?

This is for uploading to remote storage from my home network with more limited connectivity, particularly for uploading and sharing with other users so as to limit the impact on others' usage browsing ...
0 votes
0 answers
16 views

Command to reset xHCI controller on MacOS 12

I'm looking for a command (or process) to reset a USB port (or entire xHCI controller) on MacOS 12 (Monterey). The traditional mechanism of unloading and reloading the XHCI kernel extension driver ...
2 votes
0 answers
36 views

In Terminal, how do I access the hyperlink in hyperlinked text stored in the clipboard?

If I copy some text containing a hyperlink and then paste into another application that accepts it, then the text and its hyperlink is correctly copied over. How can I access this hyperlink via the ...
24 votes
6 answers
35k views

open new tab in iTerm and execute command there

I have found way to open new tab in iTerm: newtabi() { osascript -e 'tell application "iTerm" to activate' -e 'tell application "System Events" to tell process "iTerm" to keystroke "t" using ...
1 vote
2 answers
52 views

Multiple versions of the same Python installed

I installed Python3 via brew: brew install python@3.9 And following the symlink chain of which python3 leads to: $ which python3 /usr/local/bin/python3 $ ls -l /usr/local/bin/python3 lrwxr-xr-x 1 ...
0 votes
0 answers
64 views

every process killed by zsh

please help me, whenever I write some command like ls or ls -l it gives me zsh: killed ls or zsh: killed ls -l. i even tried to uninstall homebrew using homebrew docs but unable todo so due to zsh ...
0 votes
1 answer
46 views

Copy folder structure with specificed folders and its content only

I want to use terminal to copy a folder structure with specific folders inside and its content only. Structure: Parentsource folder Child one (child can be any names) Folder one (this folder ...
0 votes
3 answers
73 views

List folders with size and number of files

I'm trying to clean up my files and I'm struggling with some command line stuff. With the command du -sh * I can get a nice list of all folders where I use the command. How can I also get the number ...
0 votes
0 answers
37 views

macOS zsh terminal speed up output

I'm making a video viewer that converts a video to ASCII and then outputs it just like a video in the console. I've started working on this project on Linux and have already tested it on Windows. In ...
0 votes
3 answers
2k views

How to mount an SMB share from the command line and access it without root?

If I use Finder's ⌘K shortcut, I can mount SMB shares as my normal MacOS user. A mount point is created in /Volumes, and the mount point will be owned by the user I'm logged in as. But there are ...
20 votes
4 answers
35k views

How to make a Mac OS X .app with a shell script?

I tried following a few tutorials, but I get this: How can I fix this? I added in a info.plist (I just copied and pasted another app's file, and changed around a few things.) Also, I used chmod +x ...

1
2 3 4 5
121