Important concepts and bits



what is mtab?

matb is the currently mounted file system.

what is fstab?

fstab is the to be mounted file system while booting.

difference between mtab and fstab?

mtab is mounted file system.

fstab is the file system tab to be mounted.


where is the fstab conf and mtab conf

fstab and mtab are located in the etc directory.
etc is located in the / directory.
/ is the top of hierachy in linux.



what are the fstab entries?

there are devices or file system partitions and their types format type mount point like this we have.
example fstab entry config file.
#
# /etc/fstab
# Created by anaconda on Mon Feb 10 08:32:29 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/rhel-root   /                       xfs     defaults        0 0
UUID=5a3685c4-9e21-40cb-b476-c363a4e9942c /boot                   xfs     defaults        0 0
/dev/mapper/rhel-home   /home                   xfs     defaults        0 0
/dev/mapper/rhel-swap   swap                    swap    defaults        0 0
/dev/sr0                /mnt                    iso9660 defaults        0 0
/dev/sdb1               /space                  ext4    defaults        0 0

how to check last boot time?

boot time when it started the kernel version like this we have other parameters like what users are logged into the system.
example :

[root@balaserver ~]# last
root     pts/0        192.168.0.101    Sat Mar 21 18:21   still logged in
root     pts/1        192.168.0.110    Fri Mar 20 21:21 - 12:29  (15:08)
root     pts/0        192.168.0.102    Fri Mar 20 20:17 - 12:29  (16:12)
root     pts/0        192.168.0.102    Thu Mar 19 17:18 - 14:19  (21:00)
reboot   system boot  4.18.0-147.el8.x Thu Mar 19 17:16   still running
root     pts/0        192.168.0.104    Thu Mar 12 17:24 - 20:39  (03:15)
root     pts/2        192.168.0.104    Wed Mar 11 18:44 - 20:59  (02:15)
root     pts/1        192.168.0.101    Wed Mar 11 17:10 - crash (8+00:05)
root     pts/0        192.168.0.100    Wed Mar 11 16:48 - 18:49  (02:01)
root     pts/2        192.168.0.110    Wed Mar 11 16:46 - 16:46  (00:00)
root     pts/1        192.168.0.110    Wed Mar 11 16:45 - 16:46  (00:00)
root     pts/0        192.168.0.110    Wed Mar 11 16:41 - 16:46  (00:04)
root     pts/0        192.168.0.108    Wed Mar 11 16:36 - 16:40  (00:03)
reboot   system boot  4.18.0-147.el8.x Wed Mar 11 16:34   still running
reboot   system boot  4.18.0-147.el8.x Sun Mar  8 05:54   still running
root     pts/1        192.168.0.103    Sat Mar  7 13:29 - 16:34  (03:04)
root     tty2         tty2             Sat Mar  7 13:14 - down   (03:19)
reboot   system boot  4.18.0-147.el8.x Sat Mar  7 12:58 - 16:34  (03:35)
root     pts/1        192.168.0.108    Fri Mar  6 01:55 - 08:12  (06:17)
root     pts/0        192.168.0.100    Fri Mar  6 01:54 - 08:12  (06:18)
root     pts/2        192.168.0.100    Thu Mar  5 19:17 - 19:31  (00:13)
root     pts/2        192.168.0.100    Thu Mar  5 19:15 - 19:17  (00:02)
suneel   pts/3        192.168.0.100    Thu Mar  5 17:58 - 19:17  (01:19)
root     pts/2        192.168.0.100    Thu Mar  5 17:52 - 19:14  (01:21)
root     pts/2        192.168.0.100    Thu Mar  5 17:36 - 17:52  (00:15)
root     pts/0        192.168.0.105    Thu Mar  5 17:28 - 19:41  (02:12)
root     pts/1        192.168.0.105    Thu Mar  5 17:19 - 19:40  (02:21)
root     pts/0        192.168.0.105    Thu Mar  5 17:02 - 17:28  (00:25)
reboot   system boot  4.18.0-147.el8.x Thu Mar  5 16:56 - 20:09 (1+03:13)
root     pts/0        192.168.0.104    Tue Mar  3 19:31 - crash (1+21:24)
reboot   system boot  4.18.0-147.el8.x Tue Mar  3 16:08 - 20:09 (3+04:00)
root     pts/2        192.168.0.105    Sun Mar  1 22:55 - 23:11  (00:15)
root     pts/2        192.168.0.105    Sun Mar  1 21:59 - 22:32  (00:32)
root     pts/2        192.168.0.105    Sun Mar  1 15:32 - 18:52  (03:20)
balu     pts/1        192.168.0.104    Sat Feb 29 19:34 - crash (2+20:34)
root     pts/0        192.168.0.104    Sat Feb 29 19:33 - crash (2+20:35)
reboot   system boot  4.18.0-147.el8.x Sat Feb 29 17:15 - 20:09 (6+02:53)
root     pts/0        192.168.0.104    Sat Feb 29 16:15 - 17:14  (00:59)
reboot   system boot  4.18.0-147.el8.x Sat Feb 29 16:13 - 17:14  (01:00)
root     pts/1        192.168.0.104    Sat Feb 29 12:24 - 12:30  (00:06)
root     pts/0        192.168.0.104    Sat Feb 29 11:51 - 12:48  (00:57)
root     pts/0        192.168.0.104    Sat Feb 29 11:47 - 11:50  (00:03)
root     pts/0        192.168.0.104    Sat Feb 29 10:15 - 11:46  (01:31)
reboot   system boot  4.18.0-147.el8.x Sat Feb 29 10:14 - 15:50  (05:36)
root     pts/0        192.168.0.104    Sat Feb 29 09:53 - 10:07  (00:13)
root     pts/0        192.168.0.104    Fri Feb 28 23:53 - 23:56  (00:03)
root     pts/3        192.168.0.108    Fri Feb 28 23:06 - 23:14  (00:07)
root     pts/0        192.168.0.108    Fri Feb 28 22:01 - 23:14  (01:12)
root     pts/3        192.168.0.108    Fri Feb 28 21:44 - 21:57  (00:13)
root     pts/2        192.168.0.108    Fri Feb 28 21:42 - 23:14  (01:32)
root     pts/1        192.168.0.108    Fri Feb 28 21:37 - 23:14  (01:37)
root     pts/0        192.168.0.104    Fri Feb 28 21:26 - 21:56  (00:29)
root     pts/1        192.168.0.104    Fri Feb 28 21:25 - 21:26  (00:00)
root     pts/1        192.168.0.104    Fri Feb 28 21:23 - 21:25  (00:01)
root     pts/0        192.168.0.104    Fri Feb 28 21:20 - 21:26  (00:05)
root     pts/0        192.168.0.104    Fri Feb 28 21:14 - 21:20  (00:06)
bala     tty2         tty2             Fri Feb 28 21:13 - down   (12:53)
reboot   system boot  4.18.0-147.el8.x Fri Feb 28 21:03 - 10:07  (13:03)
reboot   system boot  4.18.0-147.el8.x Mon Feb 24 16:12 - 19:14 (4+03:01)
root     pts/2        192.168.0.108    Mon Feb 24 16:22 - 16:22  (00:00)
root     pts/2        192.168.0.105    Mon Feb 24 16:19 - 16:22  (00:02)
root     pts/5        192.168.0.105    Mon Feb 24 16:19 - 16:19  (00:00)
root     pts/2        192.168.0.105    Mon Feb 24 16:18 - 16:19  (00:00)
root     pts/4        192.168.0.105    Mon Feb 24 14:56 - 16:22  (01:26)
root     pts/2        192.168.0.105    Mon Feb 24 14:41 - 16:18  (01:36)
root     pts/2        192.168.0.105    Mon Feb 24 14:39 - 14:41  (00:01)
root     pts/3        192.168.0.109    Mon Feb 24 14:23 - 16:22  (01:59)
root     pts/2        192.168.0.105    Mon Feb 24 14:14 - 14:39  (00:25)
root     pts/1        192.168.0.105    Mon Feb 24 14:09 - 16:22  (02:13)
root     pts/0        192.168.0.105    Mon Feb 24 13:58 - 16:22  (02:24)
root     pts/0        192.168.0.100    Sun Feb 23 21:30 - 23:09  (01:38)
root     pts/0        192.168.0.100    Sun Feb 23 21:28 - 21:30  (00:02)
root     pts/0        192.168.0.100    Sun Feb 23 21:25 - 21:28  (00:02)
root     pts/1        192.168.0.100    Sun Feb 23 21:24 - 21:25  (00:00)
root     pts/0        192.168.0.100    Sun Feb 23 21:20 - 21:25  (00:04)
root     pts/2        192.168.0.100    Sun Feb 23 21:19 - 21:20  (00:00)
root     pts/2        192.168.0.100    Sun Feb 23 16:49 - 16:49  (00:00)
root     pts/1        192.168.0.100    Sun Feb 23 16:31 - 21:20  (04:49)
root     pts/0        192.168.0.100    Sun Feb 23 16:30 - 21:20  (04:50)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 16:22 - 16:23 (1+00:01)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 16:07 - 16:23 (1+00:15)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 16:04 - 16:23 (1+00:18)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 15:43 - 15:44  (00:00)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 15:38 - 15:43  (00:04)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 15:27 - 15:38  (00:11)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 15:22 - 15:38  (00:16)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 15:20 - 15:22  (00:01)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 15:17 - 15:19  (00:02)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 15:16 - 15:16  (00:00)
root     pts/2        192.168.0.100    Sun Feb 23 13:41 - crash  (01:34)
root     pts/1        192.168.0.101    Sun Feb 23 13:13 - crash  (02:02)
bala     tty2         tty2             Sun Feb 23 12:36 - crash  (02:39)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 12:35 - 15:16  (02:41)
bala     tty2         tty2             Sun Feb 23 11:38 - down   (00:39)
root     pts/2        192.168.0.103    Sun Feb 23 11:14 - 12:17  (01:03)
root     pts/1        192.168.0.103    Sun Feb 23 11:09 - 12:17  (01:08)
root     pts/0        192.168.0.103    Sun Feb 23 08:59 - 12:17  (03:18)
reboot   system boot  4.18.0-147.el8.x Sun Feb 23 08:53 - 12:17  (03:24)
root     pts/0        192.168.0.103    Sat Feb 22 23:04 - 23:35  (00:30)
root     pts/0        192.168.0.103    Sat Feb 22 19:16 - 23:04  (03:47)
root     pts/4        192.168.0.103    Sat Feb 22 17:10 - 17:12  (00:01)
root     pts/3        192.168.0.108    Sat Feb 22 17:08 - 17:12  (00:03)
root     pts/1        192.168.0.108    Sat Feb 22 17:07 - 17:12  (00:04)
root     pts/0        192.168.0.103    Sat Feb 22 17:04 - 17:12  (00:08)
root     pts/2        192.168.0.103    Sat Feb 22 16:56 - 17:14  (00:17)
root     pts/2        192.168.0.103    Sat Feb 22 16:55 - 16:56  (00:00)
root     pts/3        192.168.0.103    Sat Feb 22 15:57 - 16:42  (00:44)
root     pts/3        192.168.0.103    Sat Feb 22 15:56 - 15:57  (00:00)
bala     pts/2        192.168.0.108    Sat Feb 22 15:53 - 16:49  (00:55)
root     pts/1        192.168.0.103    Sat Feb 22 15:14 - 17:03  (01:49)
root     pts/0        192.168.0.103    Sat Feb 22 15:08 - 17:04  (01:55)
root     pts/1        192.168.0.103    Sat Feb 22 13:57 - 14:25  (00:28)
root     pts/0        192.168.0.103    Sat Feb 22 13:29 - 14:25  (00:56)
root     pts/0        192.168.0.103    Sat Feb 22 12:36 - 13:29  (00:52)
reboot   system boot  4.18.0-147.el8.x Sat Feb 22 12:23 - 23:35  (11:11)
root     pts/4        192.168.0.103    Sat Feb 22 12:34 - 12:35  (00:01)
root     pts/5        192.168.0.103    Sat Feb 22 12:26 - 12:35  (00:08)
root     pts/4        192.168.0.103    Sat Feb 22 12:23 - 12:34  (00:10)
root     pts/4        192.168.0.103    Sat Feb 22 11:19 - 11:40  (00:21)
root     pts/3        192.168.0.103    Sat Feb 22 11:12 - 12:34  (01:21)
root     pts/2        192.168.0.103    Sat Feb 22 11:11 - 12:34  (01:23)
root     pts/1        192.168.0.107    Sat Feb 22 08:52 - 12:35  (03:42)
bala     tty2         tty2             Sat Feb 22 08:45 - down   (03:50)
root     pts/1        192.168.0.103    Sat Feb 22 00:30 - 00:38  (00:08)
root     pts/0        192.168.0.103    Fri Feb 21 23:54 - 02:51  (02:57)
reboot   system boot  4.18.0-147.el8.x Fri Feb 21 23:53 - 12:35  (12:42)
root     pts/1        192.168.0.103    Fri Feb 21 22:32 - 22:32  (00:00)
root     pts/2        192.168.0.103    Wed Feb 19 21:29 - 00:45  (03:16)
root     pts/2        192.168.0.103    Wed Feb 19 21:22 - 21:29  (00:06)
root     pts/2        192.168.0.103    Wed Feb 19 20:19 - 20:19  (00:00)
root     pts/1        192.168.0.103    Wed Feb 19 20:19 - 00:45  (04:26)
root     pts/1        192.168.0.103    Wed Feb 19 20:17 - 20:18  (00:00)
root     pts/1        192.168.0.103    Wed Feb 19 19:16 - 20:17  (01:01)
root     pts/1        192.168.0.103    Wed Feb 19 18:05 - 18:56  (00:51)
root     pts/1        192.168.0.103    Wed Feb 19 17:38 - 18:05  (00:26)
root     pts/1        192.168.0.103    Wed Feb 19 16:46 - 17:38  (00:51)
root     pts/1        192.168.0.103    Wed Feb 19 16:43 - 16:46  (00:03)
root     pts/1        192.168.0.103    Wed Feb 19 16:43 - 16:43  (00:00)
root     pts/1        192.168.0.103    Wed Feb 19 16:42 - 16:43  (00:00)
root     pts/2        192.168.0.103    Wed Feb 19 16:42 - 16:42  (00:00)
root     pts/1        192.168.0.103    Wed Feb 19 16:41 - 16:42  (00:01)
root     pts/1        192.168.0.108    Wed Feb 19 16:32 - 16:32  (00:00)
bala     tty2         tty2             Wed Feb 19 16:30 - down  (2+06:02)
reboot   system boot  4.18.0-147.el8.x Wed Feb 19 16:28 - 22:32 (2+06:04)
bala     tty2         tty2             Wed Feb 12 16:21 - crash (7+00:07)
reboot   system boot  4.18.0-147.el8.x Wed Feb 12 16:20 - 22:32 (9+06:12)
root     pts/0        192.168.0.105    Mon Feb 10 21:50 - 21:54  (00:03)
root     pts/1        fe80::f9dd:87c8: Mon Feb 10 21:29 - 21:40  (00:11)
root     pts/0        192.168.0.105    Mon Feb 10 21:28 - 21:40  (00:11)
root     pts/2        192.168.0.105    Mon Feb 10 21:27 - 21:27  (00:00)
root     pts/1        fe80::f9dd:87c8: Mon Feb 10 21:25 - 21:27  (00:02)
root     pts/0        192.168.0.105    Mon Feb 10 21:24 - 21:28  (00:03)
bala     tty2         tty2             Mon Feb 10 21:20 - down   (00:33)
reboot   system boot  4.18.0-147.el8.x Mon Feb 10 21:19 - 21:54  (00:34)
root     pts/1        192.168.0.105    Mon Feb 10 20:22 - crash  (00:57)
root     pts/2        192.168.0.105    Mon Feb 10 20:21 - 20:22  (00:00)
root     pts/2        192.168.0.105    Mon Feb 10 20:16 - 20:16  (00:00)
root     pts/1        192.168.0.105    Mon Feb 10 20:13 - 20:21  (00:07)
bala     tty2         tty2             Mon Feb 10 20:10 - crash  (01:09)
reboot   system boot  4.18.0-147.el8.x Mon Feb 10 20:09 - 21:54  (01:44)
bala     tty2         tty2             Mon Feb 10 20:05 - crash  (00:03)
reboot   system boot  4.18.0-147.el8.x Mon Feb 10 20:05 - 21:54  (01:49)
bala     tty2         tty2             Mon Feb 10 19:59 - down   (00:05)
reboot   system boot  4.18.0-147.el8.x Mon Feb 10 19:49 - 20:04  (00:15)

wtmp begins Mon Feb 10 19:49:38 2020


so here bala, root , reboot describes its time when it is started and when the system got down.

users, terminals,system ip, time stamp these are the parameters.

Popular posts from this blog

script and validation for the lvm

shell script to create and extending the volume