Last modified:
Wednesday, 02-Jul-2025 16:44:17 UTC. Maintained by: Elisa E. Beshero-Bondar
(eeb4 at psu.edu). Powered by firebellies.
Create Shell Aliases and System Dot Files
In this assignment, you will learn to create aliases (or shortcut commands) for yourself, as well as create and modify
some system dot files
:
.bashrc or .bash_profile system files on Windows, or your
.zshrc on Mac and Linux.
This is necessary for upcoming units in the
course that require configuring software that runs from your shell.
For this assignment, follow this helpful tutorial create an alias (or shortcut)
for your GitHub folder (or wherever your store your GitHub repositories) on your
computer so you can reach it with one easy word. You may also write aliases to be shortcuts
for common shell commands.
-
- Try setting up a .bashrc (Windows) or
.zshrc (Mac) "system dot file" to hold keyboard shortcuts
("aliases").: A system "dot file" is
basically hidden and powerful (designed to be invisible so you do not accidentally
munge or delete it. These are called "dot files" because the filename actually
begins with a period or "dot" like this
.bashrc
.
- Inside your .bashrc or your .zshrc you can set an alias to open your shell,
type the word "github" as shorthand for
cd
file/path/to/your/GitHubFolder
.
- To do this so that your commands work, you need:
- to find where your .bashrc and .zshrc files are stored on your computer.
Usually this is in the "home" location, which you can find with the command
cd
(or cd + the space-bar)
- to know the filepath to the location of the directory that you want to
access with the alias.
- to clearly understand how to write filepaths from one location to another
on your computer.
- As you get used to writing git commands, you can set special git aliases for
commands like `git commit -m "...."` so you
don't have to type all that out.
- Here's a short video I made demonstrating how I set up an alias on Windows
in the Git Bash shell.
- What to submit: A screen capture from your shell showing your .bashrc
or .zshrc with the aliases