Linux Basicsο
Now, that we have installed Linux, letβs explore how to effectively navigate thorugh the linux system, unlike windows or MacOS, Linux primarliy uses command line interface (CLI), their exist graphical user interface (GUI) as well, but the command line is the most powerful and efficient way to interact with the system.
Here are some basic command that you will need to know to get started with Linux.
File Operations πο
These commands help you create, move, and manage files and directories.
1. touch (Create a File)ο
The touch command creates an empty file.
touch filename
Example: To create a file named example.txt:
touch example.txt
2. mkdir (Create a Directory)ο
The mkdir command creates a new directory.
mkdir directory_name
Example: To create a directory named projects:
mkdir projects
3. cp (Copy Files)ο
The cp command copies files or directories from one location to another.
cp source_file destination
Example: To copy file.txt to another directory:
cp file.txt /home/user/documents
4. mv (Move/Rename Files)ο
The mv command moves or renames files or directories.
mv old_name new_name
Example: To move file.txt to another directory:
mv file.txt /home/user/documents
Or to rename file.txt to newfile.txt:
mv file.txt newfile.txt
5. rm (Remove Files/Directories)ο
The rm command removes files or directories.
rm filename
Example: To remove a file named file.txt:
rm file.txt
To remove a directory and its contents:
rm -r directory_name