Jump to content



So, you've stepped into the Linux world – great move! Now, let's chat about the basics that make Linux run smoothly: the commands. Think of these commands as your magic wand to make things happen on your computer. Whether you're exploring IT or just curious about Linux, these commands are your go-to tools. Get ready to take charge of your Linux system as we break down the basics and make you the master of your computer world!

Navigating the File System:

1. ls - List Files:

Command: ls

Example: ls -l /home/user/Documents

Description: Lists files and directories in the specified location.

2. cd - Change Directory:

Command: cd

Example: cd /var/www/html

Description: Changes the current working directory.

3. pwd - Print Working Directory:

Command: pwd

Example: pwd

Description: Displays the current working directory path.

File and Directory Manipulation:

4. cp - Copy:

Command: cp source_file destination

Example: cp file.txt /backup

Description: Copies a file or directory to the specified destination.

5. mv - Move/Rename:

Command: mv source destination

Example: mv file.txt /new/location

Description: Moves or renames a file or directory.

6. rm - Remove:

Command: rm filename

Example: rm old_file.txt

Description: Deletes a file. Use with caution.

Text File Operations:

7. cat - Concatenate and Display:

Command: cat filename

Example: cat sample.txt

Description: Displays the contents of a file.

8. nano - Text Editor:

Command: nano filename

Example: nano document.txt

Description: Opens a simple text editor for file editing.

9. grep - Search Text:

Command: grep pattern filename

Example: grep "keyword" file.txt

Description: Searches for a specified pattern in a file.

System Information and Processes:

10. ps - Process Status:

Command: ps aux

Example: ps aux | grep process_name

Description: Displays information about active processes.

11. top - System Monitoring:

Command: top

Example: top

Description: Real-time system monitoring, showing processes and resource usage.

12. df - Disk Free:

Command: df -h

Example: df -h

Description: Displays disk space usage.

User and Permission Management:

13. useradd - Add User:

Command: sudo useradd username

Example: sudo useradd john_doe

Description: Adds a new user to the system.

14. passwd - Change Password:

Command: passwd username

Example: passwd john_doe

Description: Changes the password for a user.

15. chmod - Change Permissions:

Command: chmod permissions filename

Example: chmod 755 script.sh

Description: Modifies file permissions.

1 Comment

Recommended Comments

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Add a comment...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...