Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What did I just do by typing x = 'ls' in my Mac terminal?

I was watching a tutorial on using the terminal and someone had an example where they set variables as shortcuts for long strings of commands. I decided to try it out by setting

x = 'ls'

It took a lot longer to execute than one would expect... then I got a popup saying XQuartz quit unexpectedly.

What did I do? Is there anything I need to fix?

like image 516
WhatAmIDoing Avatar asked Dec 14 '25 15:12

WhatAmIDoing


1 Answers

You probably started the X server with options = and ls. This will attempt to take over the display and maybe fail because another X server is already running.

Starting an X server usually takes a second or two to initialize the display HW, keyboard, mouse, whathaveyou. This is why your computer takes a little while until it issues the error message.

You don't need to fix anything, other than remembering that space is meaningful to the shell. x = 'ls' is very different from x='ls'.

like image 161
Jens Avatar answered Dec 18 '25 16:12

Jens



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!