0% found this document useful (0 votes)
7 views

Basic Shell Commands

This document provides a comprehensive list of basic shell commands for Linux/macOS/WSL/Ubuntu, Git/GitHub commands, npm/yarn commands for project dependency management, and basic network and hosting commands. Each command is accompanied by a brief description of its function. It serves as a quick reference guide for users working with these tools.

Uploaded by

mk7072206
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Basic Shell Commands

This document provides a comprehensive list of basic shell commands for Linux/macOS/WSL/Ubuntu, Git/GitHub commands, npm/yarn commands for project dependency management, and basic network and hosting commands. Each command is accompanied by a brief description of its function. It serves as a quick reference guide for users working with these tools.

Uploaded by

mk7072206
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

🗂️ Basic Shell Commands (Linux/macOS/WSL/Ubuntu)

Command Description

ls List directory contents

ls -a List all (including hidden) files

cd folderName Change to a directory

cd .. Go back one directory

pwd Print working directory

mkdir folderName Create a new folder

touch fileName Create a new file

rm fileName Delete a file

rm -r folderName Delete a folder recursively

cp file1 file2 Copy a file

mv file1 newLocation/ Move or rename file

cat fileName View file contents

clear Clear terminal screen

code . Open current folder in VS Code (requires code CLI installed)

exit Close terminal session

🔧 Git/GitHub Commands
Command Description

git init Initialize a Git repository

git clone <url> Clone a repository

git status Check file changes

git add . Stage all changes

git commit -m "message" Commit changes with a message


git push Push to remote repo

git pull Pull latest changes

git branch List branches

git checkout -b branchName Create and switch to a new branch

git merge branchName Merge a branch into current branch

git remote -v View remote URLs

git log Show commit history

git config --global user.name "Your Name" Set Git username

git config --global user.email "you@example.com" Set Git email

git stash Temporarily save uncommitted changes

git reset --hard HEAD Undo all uncommitted changes

📦 npm/yarn (Project Dependency Management)


Command Description

npm init -y Initialize a Node.js project

npm install / yarn Install all dependencies

npm install packageName Install a specific package

npm uninstall packageName Remove a package

npm run start / yarn start Run project in development mode

npm run build / yarn build Build the project for production

npx create-react-app my-app Create a React app

npm i -g vercel Install global CLI (e.g., Vercel)

npx Run a package without installing globally

🌐 Network & Hosting (Basics)


Command Description
vercel Deploy to Vercel

firebase login Login to Firebase

firebase init Initialize Firebase project

firebase deploy Deploy to Firebase

📁 File and Process Utilities


Command Description

nano fileName Edit file in terminal

chmod +x file.sh Make a shell script executable

ps / ps aux Show running processes

kill PID Kill a process by PID

top Real-time system processes

curl / wget Fetch content from URLs (e.g., APIs)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy