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.

Filter by
Sorted by
Tagged with
8 votes
3 answers
8k views

Linux 'Byobu' equivelant for mac

So at home ive been a linux user for a while, and frequently use byobu in the terminal. After a little searching I was unable to find anything like it for a mac, which I now have to use at work. I'm ...
0 votes
0 answers
9 views

WiFi Advanced Settings replacement command for airport

Previously you could use the the airport prefs command to edit things like RequireAdminNetworkChange and RequireAdminPowerToggle (WiFi > Advanced > Require administrator authorisation to change ...
3 votes
3 answers
138 views

Reset default terminal directory Mac Ventura 13.6.7

I had previous changed the default directory my terminal opens up in to a specific sub folder in Documents no matter when or how you open a new terminal. I want to reset it back to the default ...
0 votes
1 answer
300 views

I accidentally clicked deny on port open prompt

I'm developing an app that binds to a local address, on a random port when it runs. I used to get a prompt to allow connections but I accidentally pressed Enter key and I think I denied the terminal ...
0 votes
1 answer
372 views

MacBook Air 2015; Login and recovery mode failed

I’ve been having problems with my MacBook Air (Early 2015). Since installing an update to 10.13.6 (From 10.13.3, I believe) the computer freezes once the progress bar fills up on the login screen. ...
1 vote
2 answers
55 views

How can I add a keyboard shortcut for a nested menu item?

It used to be possible (on macOS 10.14 below at least), to set up a keyboard shortcut to open up a specific terminal profile: Unfortunately, on macOS 12 and later (at least, I never ran 10.15 or 11), ...
5 votes
1 answer
6k views

Error: unable to open database from Terminal

sqlite3 ~/Library/Mail/V6/MailData/Envelope\ Index vacuum; Error: unable to open database "/Users/Me/Library/Mail/V6/MailData/Envelope Index": unable to open database file This happened ...
11 votes
4 answers
9k views

Change terminal color for each tab

I work on a lot of tabs in terminal at a given time. Sometimes, I get tabs mixed up and accidently run commands on tabs I am not supposed to. To simplify this, I wish to write some script, that on ...
1 vote
1 answer
52 views

Copy file from terminal into clipboard and paste in Finder [duplicate]

What I can do is: open finder, copy a file, or directoy paste it in some other directory What I want is: open terminal copy a file (the name?) into my clipboard open finder paste it in some ...
30 votes
7 answers
43k views

Where does $LANG variable gets set in Mac OS X?

I've used wget for the first time after installing Lion OS X and I've noticed that wget got localized to my native language. Running set command in terminal showed that my LANG variable represents my ...
0 votes
1 answer
64 views

How can I clear the whole window in Terminal with one keyboard shortcut?

I want a keyboard shortcut that will clear everything from the terminal window, including the current line I know that Command-K clears the text to the very beginning, but if you have some text on ...
1 vote
0 answers
25 views

Concerning prompt change in Mac terminal [duplicate]

Normally, my Mac's terminal prompt is home@Primarys-MacBook-Pro. When I connect to an unsecured network at my hotel, the prompt in my terminal changes to home@JUSTIN-s-Note20. My name isn't Justin, ...
1 vote
2 answers
70 views

Make backslash \ in terminal (Danish keyboard)

I am using a Danish keyboard language and Danish keyboard layout. When typing in my browser or other applications on my computer, I can make a backslash. In my case I use the combination shift + ...
0 votes
1 answer
139 views

Unlock ssh-agent keychain access prior to terminal opening?

With my SSL certificate passwords stored using ssh-agent I just need to provide a master passphrase to unlock the keychain in the terminal. Generally this isn't an issue, but when the computer ...
83 votes
19 answers
310k views

Is there a way to start a specific application with a keyboard short cut? [duplicate]

Sort of like the Windows+R command in the windows world? That actually just lets you run a command but you get the idea.
8 votes
2 answers
1k 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
22 views

How to prevent terminal windows from resizing after disconnecting external monitor?

My Terminal windows are 80x24. I usually use my MacBook in clamshell mode connected to my studio display. When I disconnect my Mac to work on the built-in display the windows get resized to 84x24. So ...
1 vote
0 answers
26 views

How can I apply a defaults value I have set in the terminal

I want to programmatically enable and disable the accessibility colour filters. This can be achieved manually via System Settings > Accessibility > Display > Colour Filters > Colour ...
0 votes
1 answer
30 views

How to read a nested key with 'defaults'

I can read preferences from a domain, and I can read a single key deep, for example: defaults read com.apple.Terminal "Window Settings" However, I cannot dereference a key deeper than depth=...
25 votes
6 answers
13k views

Are there any global key combinations suitable or specifically reserved on OS X for user assignment?

I'm trying to identify an appropriate global hotkey to set in iTerm2's preferences for showing/hiding it: I'd like to avoid any conflicts with other applications' hotkeys or other future use. Are ...
1 vote
1 answer
466 views

Missing Boot Options MacOS High Sierra

I have previously 3 OS installed on my MBP 2010 13”, MacOS High Sierra, Windows 10 and Linux (Peppermint OS). So I decided to change my linux to ZorinOS and trying to flash it. However, I think the ...
1 vote
1 answer
31 views

Unable to delete old company OneDrive folder

I used to work at a company that used OneDrive. I neglected to unlink the OneDrive account. Now I can't delete the folder. I started out with: ls -lae ... drwx------@ 2 jonathan staff 64 May ...
3 votes
1 answer
664 views

How can I fix things when LaTex issues a package minted error for "Pygments" or pigmentize?

I am trying to install the "Pygments" package to Python via terminal on my Mac so that I can utilize the "minted" package in Latex. I have downloaded the package via the terminal by using the ...
11 votes
4 answers
6k views

Can man pages be converted to html and/or pdf format?

The command man bash produces a lot of output. What I desire would be to either search the results or print the results to paper. So, is there a way to convert a man page to a html and/or pdf document....
6 votes
2 answers
8k views

Setting Account Picture/JPEGPhoto with dscl in terminal

I'm working on a script based on this question: What steps are needed to create a new user from the command line on Mountain Lion? The script is packaged up in an empty installer as a postflight ...
9 votes
1 answer
7k views

Wrong working directory, if bash script is opened via double-click

I wrote a bash script in order to directly start eclipse from different workplace locations. Each workplace contains the script, after running it, eclipse is started with the respective workspace set. ...
2 votes
0 answers
42 views

Why does code-signing identity look revoked when using SSH, but good when using Terminal app?

Problem If I SSH to the mac remotely from another computer, then view valid code-signing identities, I get CSSMERR_TP_CERT_REVOKED, as seen below. # executing remotely in an ssh session % security ...
6 votes
4 answers
2k views

Convert PS file to PDF using macOS Ventura?

I have created a .ps file using this command: man -t man > test.ps But what I want to do is convert the .ps file to a .pdf file. If someone could point me in the right direction I would appreciate ...
1 vote
0 answers
27 views

Run shell script in Automator with privileges

I'm trying to run a shell script in an Automator folder action that runs with privileges strong enough to delete files within that folder. The folder action contains only a Run Shell Script action ...
16 votes
5 answers
30k views

Why `echo -n` doesn't work in this script on mac terminal?

I am learning shell from tutorialspoint today:http://www.tutorialspoint.com/unix/unix-shell-loops.htm And I copied this code block to a loop.sh file: #!/bin/sh a=0 while [ "$a" -lt 10 ] # this ...
1 vote
1 answer
1k views

Is it possible to close a script with a keypress?

In AutoHotKey, using the keyword "ExitApp" can allow the user to stop a script with a keypress. For example, Esc::ExitApp can stop a script by pressing "esc". Now, with a ...
37 votes
2 answers
65k views

Using bash/terminal to get number of battery recharge cycles

I would like to get the number of recharge cycles using bash (terminal commands). I understand the following command will display all of the battery data, but I want the cycle count on its own ioreg -...
45 votes
4 answers
66k views

Will Terminal show a progress bar when I copy with "cp"?

Is is possible to display a progress bar when copying files in Terminal using cp?
1 vote
1 answer
61 views

Automator script error -212

Im on an intel macOS Catalina and I am trying to create a automation using apple script to run a command in zsh terminal. The command is to set new defaults for my bash profile and it works perfectly ...
1 vote
1 answer
95 views

Undentified shell script "open" added to open at login

Logged in into my laptop this morning, to see that a shell script "open" has been added to open at login. Its from an unidentified developer, created a month back, but just got added to ...
6 votes
1 answer
708 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 ...
3 votes
2 answers
1k views

Why does "Terminal" retain focus / stay in the foreground when I open other apps, and how do I prevent or change that?

When I have "Terminal" in the foreground and open another application, the new application opens in the background (rather than the foreground). This is rather annoying, as I always need to ...
1 vote
0 answers
18 views

Ho can I find "offline files" in the terminal (due to fileprovider / OneDrive)?

I've been having trouble with Microsoft OneDrive, which throws up a lot of sync errors and syncs very slowly if at all. However, despite having selected for the directory at issue "Always Keep On ...
4 votes
4 answers
1k views

`exit` man page

MacOS 14, M3 Pro, default zsh shell I am trying to find the man page for exit corresponding to this entry on SS64. Using man -a exit loads builtin(1) twice, exit(3) once, and Tcl built-in command exit(...
-1 votes
1 answer
53 views

Controlling the new man page pop-up

Frequently while typing comands in Terminal, a yellow window pos up which tries to display a man page. I haven't figured out what triggers it, but it's almost always empty and is trying to show man X ...
2 votes
3 answers
2k views

How do I set the working directory as the tab title in Terminal for Mac?

One of my Macs is running Mac OS Mojave and so for parity with my Catalina machine I switched the shell to zsh. Not sure exactly when but at some point I noticed the current working directory was ...
2 votes
1 answer
1k views

How to delete the word in front of the cursor in terminal on Mac OS

I've read fn + option + delete will delete the word in front of cursor. This works for me in any of the editors i use, or any other text fields (chrome, textedit etc). However in terminal, the key ...
1 vote
1 answer
144 views

Relaunch Terminal using a command

Today, to convert from Markdown to PDF using Pandoc, it was necessary to install pdflatex. I did brew install basictex and then it was necessary to relaunch Terminal. For this, I simply quitted it and ...
18 votes
4 answers
5k views

Can I make the mouse hairpin in the terminal more visible?

It often takes me a while to find the mouse crosshair when working with Terminal.app. Is there a way to make it more visible?
0 votes
3 answers
110 views

If a hacker succeeds in using my Apple ID to log his device into my iCloud account, can he spy on my devices well enough to hack into my web accounts? [closed]

I ask, assuming the latest versions of iOS and MacOS. Can he capture keystrokes created on my devices? Can he access my Google, Yahoo, etc website accounts if I'm logged into those sites, assuming he ...
1 vote
1 answer
470 views

PM2 startup on macOS Catalina

I'm trying to set pm2 to auto start on Mac OS like this pm2 startup However I keep getting this error: env: Fusion.app/Contents/Public:/usr/local/bin: No such file or directory I tried the ...
1 vote
1 answer
322 views

Edit Smart Folder savedSearch manually for command line

I have a set of Smart Folders in High Sierra that index documents on a USB hard drive. The Smart Folders are saved on the USB drive and they work. I have moved the whole content including therefore ...
0 votes
0 answers
17 views

Segregate or identify each command interaction in Terminal.app?

The IntelliJ IDE by JetBrains will have a new Terminal window with the nifty feature of segregating each command-and-response. This feature makes visual scanning and re-reading much easier. Is there ...
0 votes
0 answers
17 views

How to use dark background support with lesspipe?

I got lesspipe installed and enabled with export LESSOPEN=|/opt/homebrew/bin/lesspipe.sh %s and it works well. The problem I'm facing is that my iTerm2 has a dark background, and I don't see a way to ...
3 votes
1 answer
153 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 ...

1
2 3 4 5
130