Here are some examples of how to use basic terminal commands:
-
pwd: To display your current directory.pwd -
ls: To list the contents of the current directory.ls -
cd: To change to a different directory. Replacedirectory_namewith the name of the directory you want to access.cd directory_name -
mkdir: To create a new directory. Replacenew_directorywith the desired directory name.mkdir new_directory -
rm: To remove a file. Replacefile_namewith the name of the file you want to delete.rm file_name -
cp: To copy a file. Replacesource_filewith the file you want to copy anddestination_filewith the name of the new file.cp source_file destination_file -
mv: To move or rename a file. Replaceold_file_namewith the current file name andnew_file_namewith the desired name.mv old_file_name new_file_name -
echo: To display text in the terminal.echo "Hello, World!" -
cat: To view the contents of a file. Replacefile_namewith the name of the file.cat file_name -
man: To view the manual for a command. Replacecommand_namewith the command you want to learn about.man command_name
These commands form the foundation for navigating and managing files in a Linux environment.
