1. echo π
echo
is the command used to print a line of text, the word you enter after the echo
command will be printed on your screen.
2. ls π
ls
command is used to list all the contents of a directory.
The photo below shows all of the files inside the ~
directory.
ls -a
a
stands for all. The ls -a
command lists all of the files inside the current directory, including hidden files.
3. cd π β‘οΈ π
cd
command stands for change directory and it is used to navigate to new directories in the system.
3. pwd πΊοΈ
pwd
command or the present working directory command is used to print the directory you are currently in.
4. mkdir π
mkdir
or make directory used to create a new directory.
5. rm π«‘
rm
command is used to delete files within a directory.
6. cp Β©οΈ
To copy one file to another file and their content use cp
command.
cp [source] [destination]
7. touch π
touch
command is used to create a new file.
8. cat π
To add some content to the file use cat
command.
Press ctrl + d
to exit from the prompt.
To read the contents of the file run cat
command followed by the filename.
9. mv βοΈ
To move a file which is similar to cutting and pasting a file to a different location using the mv
command. You also rename a file in the same way, no separate command is present to rename.
10. man π§ββοΈ
man
command is used to display the user manual of any command that we can run on the terminal.
11. sudo ποΈ
Finally, If you prefix sudo
with any Linux command, it will run that command with elevated privileges. You'll be required to enter your password to execute these commands.
Thanks! for reading this blog :)
Hope this blog will help you!π