Linux users and administrators can’t really live by the GUI alone. By only learning how to work with your tool, can you get the most out of Linux. Hence, we’ve brought together a list of useful Linux commands into this convenient guide, which will be of help no matter which Linux Curriculum you choose to learn from. Show
So, I’ve categorized these commands into the following segments;
Linux provides a CLI (Command Line Interface) to communicate with the OS. Here are the most basic of the Linux Commands. 1. pwdThis command Displays the current working directory of the terminal. syntax: $ pwd 2. echoThis command writes its arguments to standard output. syntax: $ echo "<text>" 3. suThis command is used to switch to root-user so that superuser permissions can be used to execute commands. syntax: $ su 4. su <username>This command is used to switch to a different user whose name is passed as the argument. syntax: $ su <username> 5. sudoThis command executes only that command with root/ superuser privileges. syntax: $ sudo <command>
6. clearThis command is used to clear the terminal screen. Contents will not actually be deleted in this case, only scrolled down. You can also clear the screen by pressing Ctrl+L on the keyboard. syntax: $ clear Linux Commands: Working with Files7. cpThis command copies files and directories. A copy of the file/directory copied, still remains in the working directory. syntax: $ cp <flag> {filename} /pathname/
8. mvThis command moves files and directories from one directory to another. The file/directory once moved, is deleted from the working directory. syntax: $ mv <flag> {filename} /pathname/
9. rmThis command removes files from a directory. By default, the rm command does not remove directories. Once removed, the contents of a file cannot be recovered. syntax: $ rm <flag> {filename}
10. grepThis command is used to search for a particular string/ word in a text file. This is similar to “Ctrl+F”, but executed via a CLI. syntax: $ grep <flag or element_to_search> {filename}
Linux Commands | EdurekaThis Edureka Live Session gives you an extensive explanation on the basic Linux commands so that you can start using the Linux CLI. 11. catThis command can read, modify or concatenate text files. It also displays file contents. syntax: $ cat <flag> {filename}
Linux Commands: Working with Directories12. lsThis command lists all the contents in the current working directory. syntax: $ ls <flag>
13. cdThis command is used to change the current working directory of the user. syntax: $ cd /pathname/
14. sortThis command sorts the results of a search either alphabetically or numerically. Files, file contents and directories can be sorted using this command. syntax: $ sort <flag> {filename}
15. mkdirThis command is used to create a new directory. syntax: $ mkdir <flag> {directoryname} /pathname/
16. rmdirThis command is used to remove a specified directory. Although by default, it can only remove an empty directory, there are flags which can be deployed to delete the non-empty directories as well. syntax: $ rmdir <flag> {directoryname}
Linux Commands: Working with User Permissions17. chmodThis command is used to change the access permissions of files and directories. Consider the example below. On trying to run the newly created file named chmodtest.sh, an error is thrown. After modifying the permissions of the file using the said Linux command, it turns executable. syntax: $ chmod <permissions of user,group,others> {filename} The permissions associated with each digit is as follows.
Linux Commands: Installing PackagesStable versions of most software’s will already be available in Linux repositories. Here are the Linux Commands to install them. 18. install packagesFor an RHEL based system; syntax: $ sudo yum install package-name For a Debian based system; syntax: $ sudo apt-get install package-name For a Fedora based system; syntax: $ sudo dnf install package-name Linux Commands: Working with Zipped FilesWhen you download a package from the internet, the downloaded file comes in compressed form. Here are a few commands to decompress and compress files in Linux. 19. tarThe following command is used to zip files of .tar format. syntax: $ tar –cvf tar-filename source-folder-name The following command is used to unzip files of .tar format. syntax: $ tar –xvf tar-file-name Linux Commands: Working with Secure Shell For Remote Machine Access20. sshThis command refers to a cryptographic network protocol for operating network services securely over an unsecured network. Typical use-cases include remote command-line execution, but any network service can be secured with SSH. The following command, on running at the slave node, will give remote access to the master. syntax: $ ssh <master's ip> The following command, on running at the master, will give remote access to the slave node. syntax: $ ssh <slave's ip> So, there you have it. All the Linux commands you’re sure to use in your day-to-day IT-life. Want to know more about the Commands in Linux? Edureka’s Linux course is curated to shape your career as a Linux professional & help you to run applications, perform desired functions on your system and networks, create a network configuration, and maintain security administration. Which two Linux commands can be used to display currently active processes?To list currently running processes, use the ps , top , htop , and atop Linux commands. You can also combine the ps command with the pgrep command to identify individual processes.
Which Linux command displays a list of currently running processes?You can list running processes using the ps command (ps means process status). The ps command displays your currently running processes in real-time.
Which UNIX command can be used to display all currently active processes?Type the ps aux command to see all running process in Unix.
What command displays active process?The ps Command. The ps command enables you to check the status of active processes on a system, as well as display technical information about the processes.
|