The Linux terminal may look complicated at first, but you only need a few commands to start navigating the system confidently. In this beginner-friendly video, Liko demonstrates four essential Linux commands: pwd, ls, mkdir, and cd.
These commands help you identify your current location, view files and folders, create a new directory, and move between directories.
1. pwd — Find Your Current Location
The pwd command stands for print working directory. It displays the complete path of the directory in which you are currently working.
Enter:
pwdExample output:
/home/userYou can think of pwd as asking Linux: “Where am I?”
2. ls — View Files and Folders
The ls command lists the files and folders available in your current directory.
Enter:
lsExample output:
Desktop Documents Downloads PicturesThis command is useful whenever you want to check what is available in a directory before opening, copying or deleting anything.
3. mkdir — Create a New Directory
A directory in Linux is similar to a folder in Windows. The mkdir command stands for make directory.
To create a directory named linux-practice, enter:
mkdir linux-practiceThe command normally produces no output when it is successful. Use ls to confirm that the directory was created:
lsYou should now see linux-practice in the list:
Desktop Documents Downloads linux-practice Pictures4. cd — Change Directory
The cd command stands for change directory. It allows you to move from your current directory into another directory.
To enter the newly created directory, use:
cd linux-practiceThe terminal prompt may change to indicate your new location. You can also verify it using:
pwdExample output:
/home/user/linux-practicePractice Exercise
Open a Linux terminal and enter the following commands one at a time:
pwd
ls
mkdir linux-practice
ls
cd linux-practice
pwdAfter completing the exercise, you should be able to:
Identify your current directory
View files and folders
Create a new directory
Enter the newly created directory
Command Summary
| Command | Meaning | Purpose |
|---|---|---|
pwd | Print working directory | Displays your current location |
ls | List | Displays files and folders |
mkdir | Make directory | Creates a new directory |
cd | Change directory | Moves into another directory |
Conclusion
These four commands provide a simple foundation for working with the Linux terminal. Once you are comfortable with them, you can proceed to creating files, copying and moving content, deleting files safely, and understanding Linux permissions.
Try the commands yourself instead of only watching the demonstration. Regular practice is the easiest way to become comfortable with the Linux command line.
Next lesson: Creating, copying, moving and deleting files in Linux.
No comments:
Post a Comment