DEV Community

Eden Wetende
Eden Wetende

Posted on

Understanding the Basics of Linux Operating System

This guide provides a quick and practical reference to essential Linux commands. Each section introduces a set of commands by their purpose with short explanations.

File & Directory Management

ls

Lists all files and directories in the current working directory.

ls
Enter fullscreen mode Exit fullscreen mode

this displays contents of the current folder.

pwd

Show the present working directory the folder you're currently in.

pwd

Enter fullscreen mode Exit fullscreen mode

cd

Changes the current directory

cd Documents
Enter fullscreen mode Exit fullscreen mode

moves to the documents directory.

mkdir

creates a new directory

mkdir projects
Enter fullscreen mode Exit fullscreen mode

creates a folder named projects

touch

creates an empty file

touch notes.txt
Enter fullscreen mode Exit fullscreen mode

cp

copies files or directories from one location to another.

cp file.txt /home/eden/documents
Enter fullscreen mode Exit fullscreen mode

mv

moves or rename files and directories.

mv oldname.txt newname.txt
Enter fullscreen mode Exit fullscreen mode

rm

Removes or delete files or directories.

rm file.txt
Enter fullscreen mode Exit fullscreen mode

clear

Clears the terminal screen for a clean workspace

clear
Enter fullscreen mode Exit fullscreen mode

Viewing & Editing Files

cat

Displays the content of a file in the terminal.

cat notes.txt
Enter fullscreen mode Exit fullscreen mode

less

Allows you to view file content one page at a time.

less longfile.txt
Enter fullscreen mode Exit fullscreen mode

echo

Prints text or variables to the screen

echo "Hello,Linux!"
Enter fullscreen mode Exit fullscreen mode

man

Shows the manual page for given command

man ls
Enter fullscreen mode Exit fullscreen mode

Conclusion

Learning Linux command-line basics is essential for data engineers entering the tech world.These simple commands form the foundation of navigating ,managing files and interacting with your system efficiently

Top comments (0)