Top Command Line Commands Every CMD, Git Bash, and PowerShell User Should Know
As a full-stack web developer, mastering terminal commands is crucial for efficient workflow and system management. Whether you’re using Command Prompt (CMD), Git Bash, or PowerShell, here are some essential commands to enhance your productivity.
Details | CMD | PowerShell | Git Bash |
Check current directory | cd | pwd | pwd |
Check inner file/directory | dir | dir or ls | dir or ls |
Show hidden file | dir/a:h | dir -force | ls -a |
Create directory | mkdir <directory_name> | mkdir <directory_name> | mkdir <directory_name> |
Delete directory | rmdir <directory_name> | rmdir <directory_name> | rmdir <directory_name> |
Force delete directory | rmdir <directory_name -force> | ||
Change directory | cd <directory_name> | cd <directory_name> | cd <directory_name> |
Go to parent directory | cd .. | cd .. | cd .. |
Create file in a directory | echo >file.ext | echo >file.ext | touch file.ext |
Delete file | del <file.ext> | rm <file.ext> | rm <file.ext> |
Force to delete file | rm <file.ext -force> | ||
Open file | start <file.ext> | start <file.ext> | start <file.ext> |
Rename file/directory name | ren <old_name> <new_name> | mv <old_name> <new_name> | mv <old_name> <new_name> |
Clear terminal | cls | cls | clear |
Copy any file | copy <file_name.ext> | Copy-Item <file_name.ext> | cp <file_name.ext> |
System information | systeminfo | Get-ComputerInfo | systeminfo |
Conclusion
Mastering these terminal commands can significantly streamline your development process, making tasks like file management, system navigation, and version control more efficient. Whether you’re working on a new project or maintaining an existing one, these commands will help you navigate and manage your system with ease.
Feel free to explore and experiment with these commands to see how they can fit into your workflow. Happy coding! 🚀
Feel free to connect with me on social media: