🐱 Basic Commands in Terminal
Beginners intro to basic commands in terminal
- cd — create directory
You can move from one directory to another.
A directory is used to store, organize, and separate files and directories on a computer. For example, you could have a directory to store pictures and another directory to store all your documents. Here, I already had a directory named demo but not value. So, how to create a directory?
2. mkdir — make directory
Now, I created a directory and I am in it now.
3. ls — list all computer files
ls lists all the files and folders in your computer
4. pwd — print working directory
pwd shows your path on where you are staying right now. Just like the image shown the path changed while I was in the directory and in the root!
5. rm -rf <directory name>
In the first list, I had demo as one of the folder. But what if its not required and I need to delete it?
You can use this command in this situation!
6. echo 🔊
Echo is basically like print function. It is used to display line of text/string that are passed as an argument .
7. code .
This applies only when you are using vs code. You can automatically move from the terminal you are in to your vs code platform and you can make add or make changes to your code there. (most people use this platform nowadays)