Tag: Command Line
Browse all articles, tutorials, and guides about Command Line
Guides
Introduction to Linux
A practical guide to getting started with Linux for beginners and experienced users alike. Learn the basics of the Linux operating system, command line, and system administration skills needed to feel comfortable in a Linux environment.
Introduction to Bash
A guide to learning the basics of Bash scripting and command line usage.
Posts
How to Check Which Process is Using a Specific Port from Command Line
Learn how to identify which processes are listening on specific ports using netstat, lsof, and ss commands across different operating systems.
How to Find Files Containing Specific Text on Linux
Need to locate files with specific content? Learn how to use grep, find, and other Linux tools to search through files and directories efficiently.
How to Reset Local Git Branch to Match Remote Repository HEAD
Learn different methods to reset your local Git branch to exactly match the remote repository HEAD, including hard reset, fetch and reset, and when to use each approach safely.
How to Reset or Revert a File to a Specific Revision in Git
Learn multiple ways to reset or revert a specific file to a previous version in Git, including using git checkout, git restore, and git show commands with practical examples.
How to Push a New Local Branch to Remote Git Repository and Track It
Learn how to push a new local Git branch to a remote repository and set up tracking, including different methods for initial push, setting upstream branches, and managing branch relationships.
How to Revert Git Repository to a Previous Commit Safely
Learn multiple safe methods to revert your Git repository to a previous commit, including using git revert, git reset, and git checkout with practical examples and safety considerations.
How to Undo the Most Recent Local Commits in Git
Learn different ways to undo recent Git commits using reset, revert, and rebase commands. Understand when to use each method safely.
How to Count Number of Lines in Files Using Linux Terminal
Learn different methods to count lines in text files like CSV, TXT, and other non-binary files using wc, awk, sed, and other Linux command-line tools.
How to Delete a Git Branch Locally and Remotely
Learn how to safely delete Git branches both on your local machine and remote repositories using different Git commands and safety checks.
What is the Difference Between Git Pull and Git Fetch?
Understand when to use git pull versus git fetch, how they affect your local repository, and which command is safer for different workflows.
How to Use Grep to Show Only Filenames on Linux
Learn how to use grep options to display only the names of files containing matches, making it easier to identify relevant files in large searches.
How to Rename a Local Git Branch
Learn how to rename Git branches locally using git branch -m, handle the current branch, and update remote tracking references safely.
How to Reset Git to a Previous Commit
Learn different ways to reset your Git repository to a previous commit state. Understand the differences between soft, mixed, and hard resets and when to use each approach.
How to Recursively Grep All Directories and Subdirectories
Learn how to use grep with recursive options to search through entire directory trees efficiently, including advanced filtering and performance optimization techniques.
How to Undo Git Add Before Commit
Learn how to unstage files that you've added to Git's staging area using git reset, git restore, and other methods before committing.
How to Force Git Pull to Overwrite Local Files
Learn how to use git reset, git clean, and git checkout to force git pull to overwrite local changes when you need to match the remote repository exactly.
How to Check Out a Remote Git Branch
Learn different methods to check out remote Git branches locally using git checkout, git switch, and git fetch commands with practical examples.
How to Remove Local Untracked Files from Git Working Tree
Learn how to use git clean to remove untracked files and directories from your Git working tree safely with different options and safety checks.
How to Get Your Local IP Address
Learn multiple methods to find your local IP address using command line tools, programming languages, and system utilities across different operating systems.