Tool Setup Hacks
Shell Commands
- wsl: Launches the Windows Subsystem for Linux (WSL) or accesses a WSL instance. This allows you to run a Linux distribution on Windows.
-
cd:
Changes the current directory. You use
cd <directory>
to navigate through different folders. -
git:
A version control tool used to clone repositories, commit changes, push/pull code, and collaborate with others.
git clone <repository-url>
: Clones a repository.git commit -m "message"
: Commits changes with a message.git push
: Pushes changes to the remote repository.
-
apt:
A package manager for Ubuntu and Debian-based systems. It is used to install, update, and remove software packages.
sudo apt update
: Updates the list of available packages.sudo apt install <package>
: Installs a specified package.sudo apt upgrade
: Upgrades installed packages.
-
brew:
A package manager for macOS (and Linux, with Homebrew). It helps install software packages.
brew install <package>
: Installs a specified package.brew update
: Updates Homebrew to the latest version.
-
ls:
Lists the contents of the current directory.
ls -l
:d Lists details like permissions, owner, and modification date.
-
mkdir:
Creates a new directory. Example:
mkdir <directory-name>
. -
rm:
Removes files or directories.
rm <file>
: Removes a file.rm -r <directory>
: Removes a directory and its contents.
-
mv:
Moves or renames files or directories. Example:
mv <old-file> <new-file>
to rename a file. -
cp:
Copies files or directories. Example:
cp <source> <destination>
. -
sudo:
Executes a command with superuser (admin) privileges. For example,
sudo apt install <package>
gives admin access to install the software. -
cat:
Displays the contents of a file. Example:
cat <file>
to read a file in the terminal.
Version Control
1. What have you learned about version control during this setup process?
During this setup process, I learned that version control, specifically using Git and GitHub, is a system that tracks changes to files and manages versions over time. Version control allows multiple developers to collaborate efficiently on a project and maintain a history of all changes. Some key takeaways include:
- Git is a version control system that operates locally on your machine.
- GitHub is an online platform for hosting Git repositories and collaborating with others.
2. How are the files from GitHub placed on your local machine? How do you navigate to those files?
To download files from GitHub onto your local machine, use the following steps:
Step-by-step:
Once inside the folder, you can start working on the files using your editor.
3. How are the files updated in GitHub? How do you navigate to those files?
To update the files in GitHub after making changes locally, follow this sequence of commands:
Step-by-step:
To navigate to your repository on GitHub, go to https://github.com/your-username/repository-name
.
4. How would you update your template of the portfolio_2025
repository? How would you make it more applicable to your specific course?
To update the portfolio_2025
repository and customize it for your course, you can follow these steps:
Step-by-step:
- Clone the repository if you haven’t already:
git clone <portfolio_2025-repo-url>
- Navigate to the repository folder:
cd portfolio_2025
- Customize the template:
- Change content: Update the text, images, and structure to reflect your course.
- Modify styles: Update CSS files to change colors, fonts, and layout for a more personalized design.
- Add course materials: Include specific files related to your course (assignments, notes, etc.).
- Commit and push changes to GitHub:
git add .git commit -m "Updated portfolio for course"git push origin main
Your portfolio will now be updated on GitHub with your customized changes!
Difference between Localhost and Deployed Server
Localhost is for development on my personal machine, and only I can access it. When deployed on a server like GitHub Pages, the project becomes publicly accessible on the internet, and anyone with the URL can view it.
Localhost URL
My project's localhost URL is http://127.0.0.1:4100/vibha_mandayam_2025/. No one else can access this unless they are on my network.
GitHub Pages URL
My GitHub Pages URL is https://vibha1019.github.io/vibha_mandayam_2025/. Yes, anyone with the link can view the site.
DNS and GitHub Pages
1. Domain on GitHub Pages:
Yes, the default domain provided by GitHub Pages is https://your-username.github.io/repository-name/.
2. Different URL from neighbors:
Yes, each GitHub Pages URL is different based on the GitHub username and repository name. I haven’t changed the URL, but if I purchase a custom domain, I could update it by configuring my DNS settings.
Verify Installation
While I had prior experience with VSCode and using GitHub, I encountered some challenges when trying to open my repositories with WSL.
Installation Issue
I ran into an error while attempting to install the script:
scripts/venv.sh
# Activate virtual environment, observe prompt change after running it
source venv/bin/activate