Command Line Fundamentals and Terminal Customization with ohmyzsh

I always get questions about my command-line setup from folks wondering how I got my shell setup with extra info and custom features. Typically I don\’t get time to answer this question in detail with classes I teach for other organizations, so I wanted to create a full walkthrough showing how I got my setup and how you can do the same using zsh and the ohmyzsh framework.

\"\"

This workshop (recorded live) covers how to customize your shell using zsh and the ohmyzsh framework as well as some command line essentials.

When working from the command line, there are many commands that are available to you depending on your operating system and shell setup.

Here is an overview of just a few of the commands shown in the workshop along with a description of what each one does.

While most of these are native commands, a few are aliases added by the ohmyzsh! configuration.

clearpwdcd ~/Desktopmkdir some-folder-namelstouch some-folder-name/some-file.txtcd ..cd ...cd ....cd .....rm some-file.txtrm -r some-folder-name

Some of the fundamental commands covered in the workshop

Command-line controls:

tab : allows you to auto-complete file and folder names

Special characters:

~ : Short-hand for the HOME directory

. : Short-hand for the current directory

.. : Short-hand for the parent directory

Commands:

clear : Clear the contents of the screen

pwd : Print Working Directory will print the full path to the current directory

cd <directory-path> : Navigate to the given <directory-path>

mkdir <directory-name> : Create a new folder based on the directory-name provided

ls : List all of the files and folders in the current directory

ls -a : List all of the files and folders in the current directory in addition to dot files which are typically hidden by default such as .gitignore

touch <some-file.extension> : Create a file with the given name and included file extension

cd .. : Change directory to the parent directory – Up 1 directory

cd … : (Special ohmyzsh alias) Change directory to the parent\’s parent directory – Up 2 directories

cd …. : (Special ohmyzsh alias) Change directory up 3 directories

cd ….. : (Special ohmyzsh alias) Change directory up 4 directories

rm <some-file.extension> : Remove (or delete) the given file

rm -r <some-folder-name> : Remove (or delete) the given folder name recursively

Other tips:

  • You should not include spaces in file or folder names

Leave a Reply

Your email address will not be published. Required fields are marked *