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
3
votes
1answer
557 views

MacBook Pro 15" 2017 runs hot while sleeping & closed lit

This problem happens to me every now and then and I still couldn't find a solution yet. Here's the console log for this night (when it happened), when running the command log show | grep 'Wake ...
0
votes
0answers
16 views

How to improve into vim of MacOS Mojave the speed of vertical scroll with bottom/up keys?

I transfer the original post from StackOverflow (Original post) to here since this is about Apple specificity. I have a new macbook with Mojave and vim already installed. Unfortunately, even for ...
0
votes
0answers
25 views

Resetting /usr/bin

So I was installing python3, pip, and a few other applications through Homebrew when I first got my Mac. I realized I was doing all this in /usr/bin and not /usr/local/bin, and I wanted to just to ...
5
votes
3answers
990 views

Restore Access to File System for Emacs on MacOS Catalina

I upgraded to macOS Catalina and see that applications now need to be permitted to access the file system, even the shell running inside Terminal. I work extensively in Emacs which seems to have ...
0
votes
2answers
54 views

list files by date added in terminal with function or script or another

I found this in another post but would like to be able to call a script of function to reduce the amount of typing. ls -a | \ grep -v '^\.$\|^\.\.$' | \ xargs -I {} mdls -name kMDItemFSName -name ...
1
vote
0answers
36 views

I switched to Catalina and enabled ZSH now my home/end key do not work in terminal

I switched to ZSH from BASH as per the upgrade in Catalina and all is well except my home/end keys no longer work. This can be really annoying trying to move my cursor over super far to the left ...
2
votes
2answers
128 views

grc inside terminal (with different colors into terminal as a function of files size) not working on 10.14.6 Mojave and working on High Sierra 10.13.6

I can get working the tool grc which allows to have colors for permissions and different colors as a function of the size of files listed for example with ls -l command. On my previous MacBook with ...
2
votes
1answer
30 views

Effects of changing shell

Recently Apple changed the default shell to zsh from bash. In the past I made significant changes to my .bashrc file. How should I incorporate those changes into the zsh terminal?
1
vote
0answers
45 views

Compiling GCC on Catalina

I am trying to compile GCC9 on macOS Catalina. The closest tutorial I've found is this one. The tutorial states: In order to build GCC install the required header files in the old location: 1 cd /...
0
votes
0answers
16 views

ld: library not found for -lSystem

New to Mac. I am going to install a software and running make, returns the error: $ make gcc -I/Users/username/softwarename/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/...
0
votes
0answers
23 views

Open /dev/rdisk0 gives “Operation not permitted” error despite using sudo

On Mac OSX Mojave 10.14.6, the following simple code does not work anymore : #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <...
0
votes
0answers
11 views

ssh -p to a VirtualBox Ubuntu instance stops working, error: “Could not resolve hostname ?\200\223p: nodename nor servname provided, or not known”

Is there any reason why ssh -p would stop working and error with a message like below? ssh –p 2222 osboxes@localhost ssh: Could not resolve hostname ?\200\223p: nodename nor servername provided, or ...
4
votes
1answer
898 views

Suppressing zsh verbose message in macOS Catalina

I know Catalina uses zsh as the default login shell and interactive shell, But it is very annoying when I open iTerm.app or run command with /bin/bash, It shows verbose message like below $ /bin/bash ...
23
votes
3answers
28k views

How can I dim the screen from Terminal?

Is it possible to dim the screen from Terminal, in a Mac with OS X Lion? Is there any command to do control brightness and volume?
71
votes
4answers
10k views

What are the practical differences between Bash and Zsh?

With the news that Catalina will default to Zsh instead of Bash, I'm finding lots of results telling me about the switch, and that it may cause problems with shell scripts, but I'm not familiar enough ...
27
votes
11answers
8k views

Terminal login hangs

I have a strange issue on my new MacBook Pro (late-2016, touch bar). It works fine and then, after using it for a while, opening new Terminal windows doesn't work because login hangs. Rebooting fixes ...
1
vote
0answers
20 views

Screwed up my macbook pro built in camera - Need help in command line

http://osxdaily.com/2017/03/01/disable-mac-camera-completely/ Following this advice, at one point I have used cmd lines to either disable or deleted the components...(such an idiot) While sudo chmod ...
1
vote
0answers
60 views

macOS Catalina causing “find: .: Operation not permitted” errors

I have an automation workflow that I use as a Quick Action. It takes a Finder item and calls a shell script with it. Part of the shell script runs a find command on the directory of the Finder item. ...
0
votes
1answer
12 views

Spawning multiple instances of applications via shortcuts

So I'm using BetterTouchTool to set up shortcuts, and I have a bunch that are dedicated to opening various apps. The problem is, if one of those apps are already open, then hitting the shortcut pulls ...
1
vote
2answers
4k views

Problems installing powerline fonts on macOS 10.12

I'm pretty new with MacOS and Macbooks in general. I've been a unix user for a long time and right now I'm trying to install the patched powerline fonts to use with OhMyZsh, VIM and the like but I'm ...
2
votes
3answers
1k views

Homebrew: Easy way to add 'gnubin' to path for multiple packages?

I would like to use Homebrew to install GNU versions of several utilities, and use the GNU versions by default with their usual names. From the output of brew install gnu-tar and by reading How to ...
48
votes
13answers
29k views

Can you actually use Terminal to crash your computer?

People who don't understand Terminal are often afraid to use it for fear that they might mess up their command and crash their computer. Those who know Terminal better know that that's not the case - ...
0
votes
1answer
33 views

Warning: Cask 'xxx' is unreadable: undefined method `method_missing_message' for Utils:Module

$ /usr/bin/find "$(brew --prefix)/Caskroom/"*'/.metadata' -type f -name '*.rb' -print0 | /usr/bin/xargs -0 /usr/bin/perl -i -pe 's/depends_on macos: \[.*?\]//gsm;s/depends_on macos: .*//g' $ brew ...
2
votes
0answers
48 views

Show menu bar icons in Catalina defaults command not working

In Catalina, allowed ZSH full disk access in preferences and ran defaults write com.apple.systemuiserver menuExtras -array "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" "/System/...
2
votes
0answers
40 views

Trigger application “first open” via CLI?

Briefly: I would like to open an application for the first time from the command line, and have it act like it was opened in the Finder for the first time. In more detail: If you download an ...
0
votes
0answers
14 views

Using casa on a macOS Sierra [closed]

Running casa software but having a problem loading a .fits into the casa directory. A beginner at using terminal!
48
votes
16answers
33k views

How can I sleep the display from Terminal?

I'd like to be able to turn my screen off from command line. I know there's the keyboard shortcut ctrl+⇧+⏏ but I want to do it from a shell script or remotely. Is there a way?
21
votes
6answers
4k views

How can I quit an app using Terminal?

I want to quit a certain applications on my Mac using Terminal. For example, how do I kill “Slack”? Do I need its PID number?
1
vote
1answer
23 views

Mojave doesn't remember window position/size for a specific application?

Normally on Mojave all applications windows settings are stored automatically. Still I have one program which does not do this, every time I re-open this app I have to maximize (not full screen) it's ...
-1
votes
1answer
22 views

Boot drive not recognised at all

After doing an update for iPad and open Google Chrome to watch streaming movies the MacBook Pro 13 mid 2012 has started to slow down and Chrome closed. I restarted and a flashing folder appeared ...
1
vote
1answer
49 views

Impossible to redirect subprocess stderr on macOS

Running following in Terminal on macOS Mojave php -r 'foo();' 2>/dev/null Produces Fatal error: Uncaught Error: Call to undefined function foo() in Command line code on line 1 Error: Call to ...
2
votes
0answers
32 views

Why doesn't Spotlight look inside shell scripts?

I have a bunch of shell scripts (all plain text files) in /usr/local/scripts If I do fgrep -il '@todo' * there are 14 files which match. If I do mdfind -onlyin /usr/local/scripts '@TODO' there are ...
0
votes
0answers
33 views

CPAN module on macOS: Warning: Cannot install xxx, don't know what it is

I am trying to install a Perl module. > cpan rajce-get Reading '/Users/Ivanov/.cpan/Metadata' Database was generated on Fri, 04 Oct 2019 23:17:03 ...
1
vote
1answer
37 views

Command line “open DIRNAME” fails (but “open FILENAME” is OK)

In a terminal (or xterm, or emacs) window, the command: open dirname (where dirname is . or /tmp or /home/fred) doesn't open the the specified directory in Finder. However: Opening a non-directory ...
88
votes
6answers
135k views

Are my permissions for /usr/local/ correct?

I’m using HomeBrew for my port needs (seems a bit “cleaner” than MacPorts). I can install without sudoing (which is great), but the man linking step seems to require it (/usr/local/share/man/man3 ...
1
vote
1answer
73 views

Every time I press enter in the terminal it says Karans-MacBook-Air:~ karanmunjal$. How do I fix this?

My name is Karan and so obviously the laptop is named Karans MacBook Air but I dont think it should show up every time I press enter. Please tell me how to fix this!
0
votes
0answers
32 views

Can't delete iTunes Library in Finder nor in Terminal

In Finder I get the unexpected error occured (code 50). In Terminal I get: rm iTunes\ Library.itl rm: iTunes Library.itl: Invalid argument See also: charlesspencer$ ls -l iTunes\ Library.itl -...
1
vote
0answers
34 views

Disk Utility - Secure Erase is not working in terminal

I'm trying to securely erase my SSD by using diskutil in terminal in the recovery mode (restart --> hold down command+R --> terminal) I first use diskutil list to find the disk name, which is disk0: ...
352
votes
12answers
182k views

git auto-complete for *branches* at the command line?

On my Linux machine I have autocomplete for branches with Git. [Note we are talking about git branch completion, not bash completion (e.g. commands, files, etc). Thus NOT Lane's answer at all] For ...
3
votes
2answers
2k views

Disk full; Terminal in Recovery mode won’t delete files; boot kernel panics

I’m in a pickle here. macOS Mojave, just updated the other day. I managed to fill my disk up while creating a .dmg, and the system froze. I rebooted. Kernel panic. Boot to Recovery mode. Mount the ...
3
votes
1answer
486 views

Characters and notification bounce when Terminal loses focus

OSX 10.11.2 Terminal 2.6.1 I have an intermittent issue that is driving me up the wall. I spend a lot of time in Terminal in full-screen mode on my 2015 11" Macbook Air. I generally have Chrome or ...
8
votes
3answers
14k 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 ...
10
votes
2answers
3k views

Can I configure terminal to show stderr output in different colour

Is it possible to configure the terminal in OS X to show stderr output automatically in a different colour than stdout output from a process? Or is this only possible if the process is outputting ...
0
votes
0answers
24 views

Escaping variables when using open 'smb://$LOGIN:$PASSWORD@$SERVER/$PATH'

I'm trying to connect to a server using variables. However I get it to use the variables instead of the variable name. So far I've tried: /usr/bin/open 'smb://"$LOGIN":"$PASSWORD"@"$SERVER"/"$PATH"'...
2
votes
1answer
240 views

Can't change the screenshot directory because “com.apple.screencapture: command not found”

I used to be able to change the screenshot directory by just changing the location and typing in the specifics to the terminal but now I am getting this code and I have no idea what to do. I went ...
3
votes
1answer
37 views

Problem with building project by CMake

I have installed gcc and g++ instead of clang compilers from Xcode, so now I have problem with compiling with cmake. After running cmake I have got error: -- The C compiler identification is unknown -...
2
votes
3answers
20k views

Access applications and their folders from terminal

I have a folder that I want to init with git, but to do that I have to 'navigate' to that folder using cd. The problem is when I write cd Applications, that folder is empty and I cannot go into ...
0
votes
0answers
19 views

Missing .bashrc file Terminal not working

Terminal is not accepting any commands and I suspect it is due to a missing .bashrc that I couldn't find in the home directory. Please help me restore it without the use of the command line, as it is ...
1
vote
0answers
22 views

Terminal not accepting commands

Last login: Fri Sep 27 15:42:55 on ttys000 You have mail. -bash: EO: command not found -bash: cl: command not found -bash: cl: command not found -bash(7167,0x10a4bf5c0) malloc: can'...
0
votes
0answers
20 views

Problems with terminal [duplicate]

Whenever I open terminal now, the command line displays "dhcp-hol-2139:~ NAME$" how can undo this issue? Thanks!