120 commands found
List files with details
ls -laShows all files including hidden ones with detailed information
Find files by name
find . -name '*.js' -type fRecursively finds all JavaScript files in current directory
Check disk usage
du -sh * | sort -hrShows disk usage of directories sorted by size
Monitor system processes
htopInteractive process viewer (install with package manager if not available)
Create directory structure
mkdir -p project/{src,tests,docs}/{js,css,images}Creates nested directory structure in one command
Archive and compress
tar -czf archive.tar.gz folder/Creates a compressed tar archive of a folder
Extract tar archive
tar -xzf archive.tar.gzExtracts a compressed tar archive
Search text in files
grep -r 'pattern' . --include='*.js'Recursively searches for text pattern in JavaScript files
Count lines of code
find . -name '*.js' | xargs wc -lCounts total lines in all JavaScript files
Kill process by name
pkill -f 'process_name'Kills all processes matching the given name
Watch file changes
tail -f /var/log/system.logContinuously displays new lines added to a file
Check network connections
netstat -tulnShows all listening ports and network connections
Batch rename files
for f in *.txt; do mv "$f" "${f%.txt}.bak"; doneRenames all .txt files to .bak files
Check command history
history | grep 'command'Searches through command history for specific commands
Create symbolic link
ln -s /path/to/original /path/to/linkCreates a symbolic link to a file or directory
Initialize new repository
git initCreates a new Git repository in current directory
Clone repository
git clone https://github.com/user/repo.gitDownloads a copy of a remote repository
Check repository status
git statusShows the current state of the working directory and staging area
Add files to staging
git add .Stages all changes in the current directory
Commit changes
git commit -m 'Your commit message'Commits staged changes with a descriptive message
Push to remote
git push origin mainUploads local commits to the remote repository
Pull latest changes
git pull origin mainDownloads and merges latest changes from remote repository
List all branches
git branch -aShows all local and remote branches
Create new branch
git checkout -b feature/new-featureCreates and switches to a new branch
Switch branches
git checkout mainSwitches to the specified branch
Merge branches
git merge feature/branch-nameMerges the specified branch into current branch
View commit history
git log --oneline --graphShows commit history in a compact graphical format
Undo last commit
git reset --soft HEAD~1Undoes the last commit but keeps changes staged
Stash changes
git stash push -m 'Work in progress'Temporarily saves changes without committing
Apply stashed changes
git stash popApplies the most recent stash and removes it from stash list
Initialize new project
npm init -yCreates a new package.json with default values
Install dependencies
npm installInstalls all dependencies listed in package.json
Install package
npm install package-nameInstalls a specific package and adds it to dependencies
Install dev dependency
npm install --save-dev package-nameInstalls package as a development dependency
Install global package
npm install -g package-nameInstalls package globally on the system
Uninstall package
npm uninstall package-nameRemoves package from dependencies and node_modules
Update packages
npm updateUpdates all packages to their latest compatible versions
Check outdated packages
npm outdatedShows packages that have newer versions available
Run script
npm run script-nameExecutes a script defined in package.json
List installed packages
npm list --depth=0Shows all installed packages at the top level
Check package info
npm info package-nameShows detailed information about a package
Audit security
npm auditChecks for security vulnerabilities in dependencies
Fix security issues
npm audit fixAutomatically fixes security vulnerabilities when possible
Clear cache
npm cache clean --forceClears the npm cache to resolve installation issues
Publish package
npm publishPublishes the package to the npm registry
Install dependencies
pnpm installInstalls all dependencies using pnpm's efficient storage
Add package
pnpm add package-nameAdds a package to dependencies
Add dev dependency
pnpm add -D package-nameAdds package as a development dependency
Remove package
pnpm remove package-nameRemoves package from dependencies
Update packages
pnpm updateUpdates all packages to their latest versions
Run script
pnpm run script-nameExecutes a script defined in package.json
List packages
pnpm listShows all installed packages in a tree format
Check outdated
pnpm outdatedShows packages that have newer versions available
Prune dependencies
pnpm pruneRemoves packages not listed in package.json
Store status
pnpm store statusShows information about the pnpm store
Store prune
pnpm store pruneRemoves unreferenced packages from the store
Audit packages
pnpm auditChecks for security vulnerabilities in dependencies
Create workspace
pnpm initInitializes a new pnpm workspace
Execute command
pnpm exec commandExecutes a command in the context of the project
Publish package
pnpm publishPublishes the package to the npm registry
List running containers
docker psShows all currently running Docker containers
List all containers
docker ps -aShows all containers including stopped ones
Build image
docker build -t image-name .Builds a Docker image from Dockerfile in current directory
Run container
docker run -d -p 8080:80 --name container-name image-nameRuns a container in detached mode with port mapping
Stop container
docker stop container-nameStops a running container gracefully
Remove container
docker rm container-nameRemoves a stopped container
List images
docker imagesShows all Docker images on the system
Remove image
docker rmi image-nameRemoves a Docker image from the system
Execute in container
docker exec -it container-name /bin/bashOpens an interactive bash shell in a running container
View container logs
docker logs -f container-nameShows and follows the logs of a container
Docker Compose up
docker-compose up -dStarts all services defined in docker-compose.yml
Docker Compose down
docker-compose downStops and removes all containers defined in docker-compose.yml
Clean up system
docker system prune -aRemoves all unused containers, images, and networks
Copy files to container
docker cp file.txt container-name:/path/to/destinationCopies files from host to container
Inspect container
docker inspect container-nameShows detailed information about a container
Connect to server
ssh user@hostnameConnects to a remote server via SSH
Connect with specific port
ssh -p 2222 user@hostnameConnects to SSH server on a custom port
Generate SSH key
ssh-keygen -t rsa -b 4096 -C 'your_email@example.com'Generates a new RSA SSH key pair
Copy SSH key to server
ssh-copy-id user@hostnameCopies your public key to the remote server for passwordless login
SSH with key file
ssh -i ~/.ssh/private_key user@hostnameConnects using a specific private key file
SSH tunnel (local port forwarding)
ssh -L 8080:localhost:80 user@hostnameCreates a tunnel from local port 8080 to remote port 80
SSH tunnel (remote port forwarding)
ssh -R 8080:localhost:80 user@hostnameCreates a reverse tunnel from remote port 8080 to local port 80
SSH with X11 forwarding
ssh -X user@hostnameEnables X11 forwarding for running GUI applications remotely
SSH config file
nano ~/.ssh/configOpens SSH configuration file for editing connection settings
Check SSH agent
ssh-add -lLists all SSH keys currently loaded in the SSH agent
Add key to SSH agent
ssh-add ~/.ssh/private_keyAdds a private key to the SSH agent
SCP copy file to remote
scp file.txt user@hostname:/remote/path/Copies a file to a remote server using SCP
SCP copy directory
scp -r directory/ user@hostname:/remote/path/Recursively copies a directory to a remote server
SFTP connect
sftp user@hostnameOpens an interactive SFTP session for file transfers
SSH keep alive
ssh -o ServerAliveInterval=60 user@hostnameMaintains SSH connection with periodic keep-alive messages
Open current directory
code .Opens the current directory in VS Code
Open specific file
code filename.jsOpens a specific file in VS Code
Open file at line
code -g filename.js:25Opens a file and jumps to a specific line number
Install extension
code --install-extension ms-python.pythonInstalls an extension from the marketplace
List installed extensions
code --list-extensionsShows all installed VS Code extensions
Uninstall extension
code --uninstall-extension extension-idUninstalls a VS Code extension
Open in new window
code -nOpens VS Code in a new window
Wait for file to close
code --wait filename.jsOpens file and waits for it to be closed before returning
Diff two files
code --diff file1.js file2.jsOpens VS Code diff view to compare two files
Open with specific locale
code --locale=enOpens VS Code with a specific locale/language
Disable extensions
code --disable-extensionsOpens VS Code with all extensions disabled
Open user settings
code --user-data-dir ~/.vscode-customOpens VS Code with a custom user data directory
Export extensions list
code --list-extensions > extensions.txtExports list of installed extensions to a file
Open workspace
code workspace.code-workspaceOpens a VS Code workspace file
Tunnel for remote access
code tunnelCreates a secure tunnel for remote VS Code access
Check system information
uname -aShows detailed system information including kernel version
Check memory usage
free -hShows memory usage in human-readable format
Check CPU information
lscpuDisplays detailed CPU information
Monitor system resources
topShows real-time system resource usage and processes
Check disk space
df -hShows disk space usage for all mounted filesystems
List USB devices
lsusbLists all connected USB devices
Check network interfaces
ip addr showShows all network interfaces and their IP addresses
Check running services
systemctl list-units --type=service --state=runningLists all currently running system services
Check system uptime
uptimeShows how long the system has been running and load averages
Check environment variables
envLists all environment variables
Check file permissions
ls -la /path/to/fileShows detailed file permissions and ownership
Change file permissions
chmod 755 filenameChanges file permissions (755 = rwxr-xr-x)
Change file ownership
chown user:group filenameChanges file owner and group
Find large files
find / -type f -size +100M 2>/dev/nullFinds files larger than 100MB on the system
Check system logs
journalctl -fShows and follows system logs in real-time
