-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
537abc6
commit bb1dd28
Showing
44 changed files
with
1,330 additions
and
431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,3 +57,4 @@ $RECYCLE.BIN/ | |
|
||
# End of https://www.gitignore.io/api/macos,windows | ||
/.quarto/ | ||
.Rproj.user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,3 +67,5 @@ book: | |
format: | ||
html: | ||
theme: cosmo | ||
code-overflow: wrap | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Bash\n", | ||
"\n", | ||
"## Terminal vs shell\n", | ||
"\n", | ||
"Terminal (Mac) and Git Bash (Windows) are programs that can run a **shell**, which is a text-based user interface where you type commands that your computer understands.\n", | ||
"\n", | ||
"::: callout\n", | ||
"People (including myself) will use the term **shell** and **terminal** interchangeably. This means when I say \"type into your shell\" or \"in your terminal\", I mean type at the prompt in your Terminal or Git Bash program. (Just to add confusion, I use a different Mac terminal program called iTerm, but Terminal is fine.)\n", | ||
":::\n", | ||
"\n", | ||
"Developers use a shell to issue commands to their computer to do things, like install programs, change what folder their are in, etc. Using a terminal program to use your computer can be confusing at first, but it will become second-nature as you progress through this class.\n", | ||
"\n", | ||
"The shell programming language we will use for these text-based interactions is called **Bash**.\n", | ||
"\n", | ||
"**Windows** doesn't understand Bash at all without the help of another program. This is why we installed **Git Bash** so we can all speak the same language. (If you are a Windows user and haven't yet installed Git, [do it now](bash-00-intro.qmd).)\n", | ||
"\n", | ||
"For what its worth, Bash is a Unix-based program. Most of the Internet runs on Unix (or Linux) computers.\n", | ||
"\n", | ||
"**Macs** understand Bash natively, but some day they will change to a similar language called zsh. When you launch a shell on newer Macs you might get a message _The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`._ **DON'T DO THIS! JUST IGNORE IT.** We will continue to use **Bash**. Later we will add a command to disable this message. If somehow your terminal gets set to use zsh, you can [check and/or change it to Bash](a-macos-shell.qmd).\n", | ||
"\n", | ||
"## Launch your terminal\n", | ||
"\n", | ||
"::: {.panel-tabset}\n", | ||
"\n", | ||
"## macOS\n", | ||
"\n", | ||
"1. For **Macs** you can use your Launchpad and type in _Terminal_ and launch it. Or you can use the Spotlight search to find it.\n", | ||
"\n", | ||
"It will look like this:\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
"Though it may have a white screen.\n", | ||
"\n", | ||
"\n", | ||
"## Windows\n", | ||
"\n", | ||
"1. For **Windows** you can go to your Start menu and type in _Git Bash_ and launch it.\n", | ||
"\n", | ||
"It will look like this:\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
":::\n", | ||
"\n", | ||
"\n", | ||
"## The terminal prompt\n", | ||
"\n", | ||
"When I launch my terminal, the commands inside it look like this:\n", | ||
"\n", | ||
"\n", | ||
"```{bash}\n", | ||
"COMMA21617:~ ccm346$\n", | ||
"```\n", | ||
"\n", | ||
"\n", | ||
"- The first part before the `~` is my computer name\n", | ||
"- The part after the `~` is is my username.\n", | ||
"- Lastly we have the `$`. This is the \"prompt\" where you type commands. You type your commands AFTER the $ and then hit **Return** to execute them.\n", | ||
"\n", | ||
"If you see a direction for a command that includes an output, you might see the `$` before the command. DON'T TYPE IN THE $. For instance:\n", | ||
"\n", | ||
"\n", | ||
"```{bash}\n", | ||
"$ pwd\n", | ||
"/Users/ccm346/Documents/icj/myproject\n", | ||
"```\n", | ||
"\n", | ||
"\n", | ||
"Means you type in just \"pwd\" and then hit return.\n", | ||
"\n", | ||
"## Typing vs copy/paste\n", | ||
"\n", | ||
"I encourage you to type commands into your terminal instead of copy and pasting them from the lessons. Build muscle _and_ mind memory. Typing a command wrong and then having to figure out why it broke will help you learn it and remember it. If you just copy and paste blindly, then you won't learn anything other than **command-c** and **command-v**." | ||
], | ||
"id": "29931060" | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.