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

OSX Terminal Tricks

If you'd like to get an email when the next post is up:

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

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 wrote a book on building indie startups called MAKE. And I'm on Twitter too if you'd like to follow more of my stories. I don't use email so tweet me your questions. Or you can see my list of posts. 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.