The mount command loads a file system to a specified directory so that it can be accessible to users and applications. You must specify the device to mount as well as the desired mount point. Syntax The syntax of the mount command is: # mount [options] {device name} {mount point} mount Options You can specify […]
Archives for September 2021
mkfs Command Examples in Linux
The mkfs command is used to build a Linux file system on a device, which is usually a drive partition. The below table lists some options of the mkfs command and their descriptions. Option Used To -v Produce verbose output -V Produce verbose output including file-system specific command -t {fstype} Specify type of file system […]
fdisk Command Examples in Linux
The fdisk utility is a menu-driven program that is used to create, modify, or delete partitions on a storage drive. Using fdisk, you can create a new partition table or modify existing entries on the partition table. The fdisk utility understands the DOS and Linux type partition tables. The fdisk utility also enables you to […]
getfacl Command Examples in Linux
The getfacl command is used to retrieve the ACLs of files and directories. The basic output format of the getfacl command shows metadata about the object including its owner, its group, any SUID/SGID/sticky bit flags set, the standard permissions associated with the object, and the individual permission entries for users and groups. An ACL that […]
lsattr Command Examples in Linux
The lsattr command is used to list the attributes of a file or directory. The below table describes some of the options of the lsattr command. Option Used To -R Recursively list attributes of directories and their contents -a List all files in a directory -d List directories like files, instead of their contents -v […]
chgrp Command Examples in Linux
The chgrp command is used to change the group ownership of a file or directory. Changing the group ownership of an object ensures that the group permissions are applied to the specific group. Syntax The syntax of the chgrp command is: # chgrp {group name} {file/ directory name} chgrp Command Examples 1. To change the […]
chown Command Examples in Linux
The chown command is used to change the owner, the group, or both for a file or directory. At times, you may wish for someone else to manage an object’s permissions other than the user who created that object. You can combine the chown command with the -R option to recursively change ownership through a […]
id Command Examples in Linux
The id command is used to display user ID (UID) and group ID (GID) information. Entering the command with no options displays information about the user who is currently logged in. You can also specify a user name as an option to display ID information about a specific user. Syntax The syntax of the id […]
last Command Examples in Linux
The last command displays the history of user login and logout actions, along with the actual time and date. It also has options that enable you to filter users who have logged in through a specific terminal. For example, last 1 will display the details of users who logged in using the first terminal. The […]
who Command Examples in Linux
The who command is used to determine the details of users currently logged in to a system. The output of the who command includes the user name, the name of the system from which the user is connected, and the date and time that the user has been connected since. Syntax The syntax of the […]