0% found this document useful (0 votes)
3 views2 pages

Simple Linux Commands

The document provides a guide on essential Linux command-line interface commands for directory navigation, file and folder operations, viewing file content, managing permissions and ownership, and obtaining system information. Key commands include pwd, ls, cd, mkdir, touch, cp, mv, rm, cat, head, tail, chmod, sudo, chown, top, df -h, ifconfig, and man. Each command is accompanied by examples and explanations of its functionality.

Uploaded by

srilohith0806
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Simple Linux Commands

The document provides a guide on essential Linux command-line interface commands for directory navigation, file and folder operations, viewing file content, managing permissions and ownership, and obtaining system information. Key commands include pwd, ls, cd, mkdir, touch, cp, mv, rm, cat, head, tail, chmod, sudo, chown, top, df -h, ifconfig, and man. Each command is accompanied by examples and explanations of its functionality.

Uploaded by

srilohith0806
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

Directory Navigation

These commands help you move around the folders (directories) of the
system.
 pwd (Print Working Directory): Shows exactly where you are currently
located.

 ls (List): Lists all files and folders in the current directory.

 ls -l: Shows detailed info (permissions, size).

 ls -a: Shows hidden files (those starting with a dot).

 cd (Change Directory): Moves you to a different folder.

 cd Documents: Moves into the Documents folder.

 cd .. : Moves one level up (to the parent folder).


 clear: Clears the terminal screen to make it tidy.

2. File & Folder Operations

Commands for creating, moving, and deleting data.

 mkdir (Make Directory): Creates a new folder.

 Example: mkdir MyProject

 touch: Creates an empty file.

 Example: touch [Link]


 cp (Copy): Copies files or folders.

 Example: cp [Link] new_file.txt

 mv (Move/Rename): Moves a file to a new location or renames it.

 Example: mv old_name.txt new_name.txt

 rm (Remove): Deletes a file. Be careful: there is no "Recycle Bin" in CLI.

 rm -r folder_name: Deletes a folder and everything inside it.

3. Viewing File Content


How to read what is inside a text file without opening an editor.

 cat (Concatenate): Displays the entire content of a file on the screen.


 head: Shows the first 10 lines of a file.
 tail: Shows the last 10 lines of a file.

4. Permissions & Ownership

In Linux, every file has permissions for the Owner, Group, and Others.

 chmod (Change Mode): Changes file permissions.

 Example: chmod 777 [Link] (gives everyone full access).

 sudo (SuperUser Do): Runs a command with "Admin" or "Kernel"


privileges.

 chown: Changes the owner of the file.

5. System Information & Networking


 top: Displays real-time CPU and Memory usage (like Task Manager).

 df -h: Shows free disk space in a human-readable format.

 ifconfig (or ip addr): Displays network interface and IP address info.

 man (Manual): The most important command. Type man followed by any
command to see the full instruction manual.

 Example: man ls

You might also like