Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

FRANSISCO

Shell, Command Line, Navigation & File Manipulation Examples

Shell: The shell is the program that provides the user interface for interacting with the Linux kernel. It
interprets your commands and relays them to the system. A common shell is Bash (Bourne Again SHell).

Command Line: The command line is the text-based interface where you enter commands to interact
with the shell. You type commands and press Enter to execute them.

Navigation Commands

cd (change directory): This command allows you to navigate through the file system.

cd ~: Navigate to your home directory.

cd Desktop: Navigate to the "Desktop" directory within your home directory.

cd ..: Move up one level in the directory structure.

pwd (print working directory): This command displays the full path of your current working directory.

ls (list): This command lists the contents of the current directory.

ls -l: Lists directory contents with detailed information like permissions, owner, and size.

File Manipulation Commands:

touch (create empty file): This command creates an empty file with the specified name.

touch new_file.txt: Creates an empty file named "new_file.txt".


cat (concatenate): This command displays the contents of a file on the terminal.

cat new_file.txt: Displays the contents of "new_file.txt" (assuming it has content).

cp (copy): This command copies a file or directory to another location.

cp new_file.txt Documents: Copies "new_file.txt" to the "Documents" directory.


mv (move/rename): This command can be used to move a file or directory to another location or
rename a file.

mv new_file.txt renamed_file.txt: Renames "new_file.txt" to "renamed_file.txt".

mv old_file.txt Documents: Moves "old_file.txt" to the "Documents" directory.

rm (remove): This command removes a file or directory (use with caution!).

rm new_file.txt: Removes the file "new_file.txt". Be careful! This cannot be undone.

You might also like