The chfn (change finger) command updates a few pieces of personal information maintained by the system: real name, home telephone, office telephone, and office location, as displayed by the finger command.[21] Invoked without a username, chfn affects your account; invoked with a username (by the superuser), it affects that user. With no options, chfn will […]
Archives for April 2022
df Command Examples in Linux
Sometimes you need to see how much disk space is available on an individual device. The df command allows you to easily see what’s happening on all the mounted disks: $ df -h Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1s5s1 113Gi 15Gi 37Gi 29% 577263 385625880 0% / devfs 189Ki 189Ki […]
dig Command Examples in Linux
Dig is a DNS lookup utility. If it’s not installed on your system, you can find it as part of dnsutils on Debian-based package managers and bind-utils on Fedora, CentOS, and Arch. The dig command is used to query DNS servers; it is more flexible than the deprecated nslookup command. When invoked with just the […]
du Command Examples in Linux
With the df command, it is easy to see when a disk is running out of space. The next problem for the system administrator is to know what to do when that happens. Another useful command to help you out is the du command. The du command shows the disk usage for a specific directory […]
egrep Command Examples in Linux
The egrep command is an offshoot of grep, which allows you to specify POSIX extended regular expressions, which contain more characters for specifying the matching pattern. egrep searches one or more files for lines that match an extended regular expression regexp. egrep doesn’t support the regular expressions \(,\), \n, \, \{, or \}, but it […]
eject Command Examples in Linux
eject Command ejects removable media such as a CD, DVD, floppy, or tape. You may name the device by its /dev or /mnt filename. The /dev and /mnt prefixes are optional for any items in the /dev and /mnt directories. If no device is named, it is assumed that “cdrom” should be ejected. Syntax: eject […]
dir Command Examples in Linux
The dir command lists directory contents. It also lists information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor –sort is specified. dir Command Examples 1. To list all the directories: # dir -a # dir –all 2. To skip listing implied directory contents: # dir -A 3. […]
chsh Command Examples in Linux
The chsh (change shell) command sets your login shell program. Invoked without a username, chsh affects your account; invoked with a username (by root), it affects that user. With no options, chsh will prompt you for the desired information. $ chsh Changing shell for smith. Password: ******* New shell [/bin/bash]: /bin/tcsh The new shell must […]
w Command Examples in Linux
The w command shows who is logged on and what they are doing. w displays information about the users currently on the machine, and their processes. The header shows, in this order, the current time, how long the system has been running, how many users are currently logged on, and the system load averages for […]
faillog Command Examples in Linux
One of the signs that an attacker might be attempting to break into a system will be failed login attempts. The /var/log/faillog file keeps track of failed authentication attempts. The command faillog reads this logfile /var/log/faillog, and shows accounts that have not had a successful login since the last failure. The “faillog -a” command will […]