-
cd foldername
Navigate to the directory namedfoldername.cd foldername -
cd ..
Move to the parent directory of the current directory.cd ..
-
ls
Display a list of files and directories in the current directory.ls
-
ls -a
Show all files and directories, including hidden ones (those starting with.).ls -a
-
mkdir foldername
Create a new directory namedfoldername.mkdir foldername
-
touch filename.txt
Create an empty file namedfilename.txt.touch filename.txt
-
vi file.txt
Openfile.txtin thevieditor for editing. Pressito insert text and:wqto save and exit.vi file.txt
-
cat file.txt
Display the contents offile.txtin the terminal.cat file.txt
- rm -rf file.txt
Permanently deletefile.txt. Use caution, as this action is irreversible.rm -rf file.txt