The Sudo command is one of the most advanced Linux commands. While the syntax is basic, but dealing with it is critical as it requires root access. The most common use of the sudo command is to change the password for other users. For example, if Smith wants to change the password for...
More ssh examples:5 Basic Linux SSH Client Commands 5. sed command examples When you copy a DOS file to Unix, you could find \r\n in the end of each line. This example converts the DOS file format to Unix file format using sed command. $sed 's/.$//' filename Print file content...
System administration commands and daemons For example, when you do whatis crontab, you’ll notice that crontab has two man pages (section 1 and section 5). To view section 5 of crontab man page, do the following. $ whatis crontab crontab (1) - maintain crontab files for individual users...
We recommend using the -p option with any ss command you run, as it will show you the process that owns the socket.NOTE:You will need to run this as root or as a user with sudo privileges. Otherwise, it will not return the process information. As an example, we will combine it wit...
With ip you have the advantage of performing several network administration tasks with only one command. ifconfig is one of the deprecated command within net-tools that has not been maintained for many years. The functionalities of many commands is retained with more features under iproute2 suite...
The du command is one of the most often used commands by Linux users. We will look at basic examples of how one can use it efficiently. It will cover basic to advanced examples where we can use multiple options with the du tool to get the required output. Example 1:- Basic command Le...
To start fdisk for a specific disk, simply run fdisk followed by the disk’s device name. For example: sudo fdisk /dev/sda Q4: What are the common commands within the fdisk utility? Some common fdisk commands include: m:Display the help menu. ...
Run the following commands and verify the new file permission. We can specify multiple permissions with a single command. Use a comma to separate them. For example, the following command first adds the write permission for the group and then removes the execute permission for others. ...
Among the plethora of commands available in Linux, thepasswdcommand stands out as a fundamental tool. Its primary function is to change the password associated with a user account, which is crucial for maintaining security and user authentication in a Linux environment. ...
Some other commands Grep The grep filtersearchesa file for a particular pattern of characters, and displays all lines that contain that pattern. grep [options] pattern [files] Some useful options Examples: A file named "example.dat" that looks like this ...