We can see Linux commands for beginners in below

  1. ls

This command lists directory contents. It is used to list the contents in a directory.

$ ls

use -l to list the command line by line

$ ls -l

  1. grep

This finds text in a file. The grep command searches through many files at a time to find a piece of text you are looking for.

$ grep PATTERN [FILE]

  1. passwd

This command is used to change the user account password.

$ passwd

If you have root access, you may modify the password for any account using below command.

$ passwd [username]

  1. mv

The mv command moves a file or renames it. Here the file name gets changed from first.txt to second.txt.

$ mv first.txt second.txt

  1. cp

This command copies a file. The cp command is used for copy the content onr file to another file in the same directory.

$ cp first.txt second.txt

  1. rm

This command is used to remove files in a directory or the directory itself. A directory cannot be removed if it is not empty.

$ rm file1

  1. mkdir

The mkdir command makes/creates a directory.

$ mkdir

  1. chmod

This command changes the mode of a file system object. Files can have read, write, and execute permissions.

$ chmod

  1. chown

This command is used to change the ownership of a file/folder or even multiple files/folders for a specified user/group.

$ chown owner_name file_name

  1. history

This command is used to show previously used commands or obtain information about the commands executed by a user.

$ history

By Naani

Leave a Reply

Your email address will not be published. Required fields are marked *