A few years ago I sold all my stuff to explore the world, creating 12 startups in 12 months and building $1M+/y companies as an indie maker such as Nomad List and Remote OK. I'm also a big pusher of remote work and async and analyze the effects it has on society. Follow me on Twitter or see my list of posts. My first book MAKE is out now. Contact me
Subscribing you...
Subscribed! Check your inbox to confirm your email.

Blog  |  My book  |  Telegram  |  Twitter


OSX Terminal Tricks

Here’s my list of tricks I use in the OSX terminal to work faster since switching from PC to Mac.

SHOW FILE CONTENTS IN BASH

cat filename

ZIP A FILE

zip filename

UNZIP A FILE

unzip filename

CONNECT TO TELNET SERVER IN TERMINAL

ssh username@hostname

DOWNLOAD FILES VIA SSH

scp your_username@remotehost.edu:foobar.txt /some/local/directory

MOVE TO BEGINNING OR END OF LINE IN SHELL

Fn-Cursor Left and Fn-Cursor Right (since Cmd-Left and Cmd-Right don’t work in the shell)

RUN SHELL COMMAND ASYNCHRONOUS/IN BACKGROUND

Do not wait for output until continueing
command &
e.g. curl http://google.com &

RUN APACHE WEB SERVER ON OSX
Apache is pre-installed (!) on OSX. Insane. You can activate it in the terminal:

sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist

Apache’s config files are located in:

/private/etc/apache2/httpd.conf

EDITING YOUR HOSTS FILE
It’s located at:

/private/etc/hosts

FLUSH YOUR DNS CACHE AFTER EDITING YOUR HOSTS FILE

sudo killall -HUP mDNSResponder

CREATE SYMBOLIC LINKS (Fake folders that mirror other folders, e.g. like Substr on Windows/DOS)

ln -s /users/username/photos /photos

P.S. I'm on Twitter too if you'd like to follow more of my stories. And I wrote a book called MAKE about building startups without funding. See a list of my stories or contact me. To get an alert when I write a new blog post, you can subscribe below:

Subscribing you...
Subscribed! Check your inbox to confirm your email.

2019
2017
21 Jul
2017
2016
2016
27 Aug
2016
2015
17 Apr
2014
2014
2013
2013
2013
2013
2013
2013
2013
2012
2012
02 Aug
2012
09 Jul
2012
2012
2012
2012
2012
2012
2011
2011
15 Nov