command-line Getting started with command-line

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


This section provides an overview of what command-line is, and why a developer might want to use it.

It should also mention any large subjects within command-line, and link out to the related topics. Since the Documentation for command-line is new, you may need to create initial versions of those related topics.

Hello world

In Unix/Posix systems:

>$ echo "Hello World!"

This simple command will print Hello World on the terminal.

Installing ZSH as default shell on macOS

The simplest way is to use brew :

brew install zsh

After installation, you may want to set it as your default shell by doing:

sudo echo '/usr/local/bin/zsh' >> /etc/shells
chsh -s /usr/local/bin/zsh

If you have git, and required command line tools installed you can compile and install the latest version (5.2 as of this edit) as follows:

# clone the source
git clone git:// zsh

# checkout the required version, say, zsh-5.2
cd zsh && git checkout zsh-5.2

# check the documentation for help on configuration options
./configure --prefix=/usr/local \
  --enable-fndir=/usr/local/share/zsh/functions \
  --enable-scriptdir=/usr/local/share/zsh/scripts \
  --enable-site-fndir=/usr/local/share/zsh/site-functions \
  --enable-site-scriptdir=/usr/local/share/zsh/site-scripts \
  --enable-runhelpdir=/usr/local/share/zsh/help \
  --enable-etcdir=/etc \
  --mandir=/usr/local/share/man \
  --infodir=/usr/local/share/info \
  --enable-cap \
  --enable-maildir-support \
  --enable-multibyte \
  --enable-pcre \
  --enable-zsh-secure-free \

# compile and check if compiled successfully
make -j5 && make check
# you should see results of successful test scripts

sudo make install

Again, you can make zsh as your default shell by adding it to /etc/shells and using chsh as described above.

macOS using homebrew

brew install zsh
sudo echo '/usr/local/bin/zsh' >> /etc/shells
chsh -s /usr/local/bin/zsh

Got any command-line Question?