Git commands :
git clone
: Creates a copy of a remote repository on the local machine. This command is used to set up a local development environment from a remote repository.git branch
: Lists all the local branches in the repository. This command is used to manage multiple development branches in the same repository.git checkout
: Switches to a different branch or commit. This command is used to switch between different versions of the code.git merge
: Merges changes from one branch into another. This command is used to incorporate changes from a feature branch into the main development branch.git pull
: Pulls changes from the remote repository to the local repository. This command is used to keep the local repository up to date with the remote repository.git push
: Pushes local commits to the remote repository. This command is used to share changes made locally with other team members.git rebase
: Reapplies changes from one branch onto another. This command is used to incorporate changes from a feature branch into the main development branch in a more streamlined way than merging.git tag
: Creates a lightweight reference to a specific commit. This command is used to mark specific points in the development history, such as a release or a stable build.git init
: Initializes a new Git repository in the current directory.git add <file>
: Adds a file to the staging area (also known as the index) for the next commit.git commit
: Commits the changes in the staging area to the Git repository.git status
: Shows the current state of the repository, including which files are staged or unstaged.git diff
: Shows the differences between the current state of the repository and the last commit.git log
: Shows the commit history for the repository.git remote
: Lists all the remote repositories that are connected to the local repository.git stash
: Stashes changes in the working directory that are not yet ready to be committed.git reset
: Resets the repository to a previous state.git fetch
: Fetches the latest changes from the remote repository without merging them into your local branch.git revert
: Reverts a commit by creating a new commit that undoes the changes made by the previous commit.git cherry-pick
: Applies changes from a specific commit to the current branch.
These Git & GitHub commands are essential for managing code changes and collaborating on software development projects in a DevOps environment.
File and directory management Commands :
ls
: Lists the contents of the current directory.cd
: Changes the current working directory.pwd
: Prints the current working directory.mkdir
: Creates a new directory.rmdir
: Removes a directory.rm
: Removes a file.cp
: Copies a file.mv
: Moves or renames a file.touch
: Creates a new file.cat
: Displays the contents of a file.head
: Displays the first few lines of a file.tail
: Displays the last few lines of a file.grep
: Searches for a specific pattern in a file.chmod
: Changes the permissions of a file or directory.chown
: Changes the owner of a file or directory.ln
: Creates a symbolic link or hard link to a file or directory.du
: Shows the disk usage of a file or directory.df
: Shows the amount of free disk space on a file system.find
: Searches for files and directories in a directory hierarchy.tar
: Archives and compresses files and directories.
System information and management Commands :
top
: Displays the current system processes and their resource usage. This command is used to monitor the system and identify processes that may be using too many resources.ps
: Displays information about running processes. This command is used to identify specific processes and their status.kill
: Terminates a process by sending a signal to it. This command is used to stop a process that is causing issues.ping
: Sends a packet to a network host to test connectivity. This command is used to check network connectivity and identify network issues.traceroute
: Shows the route that packets take to reach a network host. This command is used to identify network latency or routing issues.ifconfig
: Displays information about network interfaces. This command is used to configure and troubleshoot network interfaces.netstat
: Shows network statistics and active network connections. This command is used to monitor network activity and identify network issues.df
: Shows the amount of free disk space on a file system. This command is used to check disk usage and identify disk space issues.du
: Shows the disk usage of a file or directory. This command is used to check file or directory size and identify disk usage issues.free
: Displays information about system memory usage. This command is used to check memory usage and identify memory-related issues.vmstat
: Shows virtual memory statistics. This command is used to monitor system performance and identify memory-related issues.uptime
: Shows how long the system has been running and the average system load over the last 1, 5, and 15 minutes. This command is used to monitor system performance.date
: Displays the current date and time. This command is used to set or check the system clock.whoami
: Shows the current user. This command is used to verify user permissions.useradd
: Adds a new user to the system. This command is used to create new user accounts.usermod
: Modifies user account information. This command is used to modify user accounts.passwd
: Changes the password for a user account. This command is used to update user account passwords.
Package management Commands :
apt-get
: A package management utility for Debian and Ubuntu-based systems. This command is used to install, update, and remove software packages from the system.yum
: A package management utility for Red Hat and CentOS-based systems. This command is used to install, update, and remove software packages from the system.dnf
: A newer package management utility for Fedora and other Red Hat-based systems. It is similar toyum
and is used to install, update, and remove software packages from the system.pacman
: A package management utility for Arch Linux-based systems. This command is used to install, update, and remove software packages from the system.dpkg
: A package management utility for Debian and Ubuntu-based systems. This command is used to install, update, and remove software packages from the system.rpm
: A package management utility for Red Hat and CentOS-based systems. This command is used to install, update, and remove software packages from the system.zypper
: A package management utility for SUSE Linux-based systems. This command is used to install, update, and remove software packages from the system.apt-cache
: A command used to search for software packages on a Debian or Ubuntu-based system.yum search
: A command used to search for software packages on a Red Hat or CentOS-based system.pacman -Ss
: A command used to search for software packages on an Arch Linux-based system.apt-mark
: A command used to mark packages as manually installed or automatically installed on a Debian or Ubuntu-based system.yum groupinstall
: A command used to install a group of software packages on a Red Hat or CentOS-based system.pacman -Syu
: A command used to update all installed packages on an Arch Linux-based system.dpkg-reconfigure
: A command used to reconfigure an installed package on a Debian or Ubuntu-based system.
Thank You for Reading the Blog.. ๐
connect with me : linkedin.com/in/shivraj-salunkhe-5881141a4
follow my blog channel : shivrajofficial.hashnode.dev