Basics of CLI (Command Line Interface)
Sadat Jubayer
January 13, 2022
• 3 min read
CLI is an essentail thing that should know by every developer. It helps to run/execute commands which are provided by the operating system.
Where to run the commands
- For Linux: Your default terminal
- For windows users: You can use WSL or Git Bash to execute the basic commands, download the git for all platforms https://git-scm.com/downloads
- For Mac Users: Almost all of the commands you use in the macOS terminal are extremely similar to the ones Linux uses.
Hello to CLI
ls
This command give you a list of all files that a folder contains.
ls accepts many options, -l
is one of them, it gives much more details of the files.
cd
It is used to change directory/folder where cd ..
indicates the parent directory.
mkdir
You can create folder/directory with this command
rmdir
To remove a directory we use rmdir. But the condition is the folder must be empty.
rm
To remove files and folder we use this command with -rf flag. Which means forcefully and recursively.
touch
This commmand is for creating files
mv
For moving and renaming files and folders we use this command.
These are the most basic commands of Command-Line that every developer should know. I hope you may find this helpful.