We can see Linux commands for beginners in below
- 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
- 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]
- 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]
- 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
- 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
- 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
- mkdir
The mkdir command makes/creates a directory.
$ mkdir
- chmod
This command changes the mode of a file system object. Files can have read, write, and execute permissions.
$ chmod
- 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
- history
This command is used to show previously used commands or obtain information about the commands executed by a user.
$ history