Basic Commands Flashcards
(291 cards)
What command parses the /proc/meminfo file for easier analysis of memory usage statistics?
free
Which command displays system usage reports based on data collected from system activity includes type of data and time data was collected?
sar
Which command exposes the local clock, the universal time, and the hardware clock?
timedatectl
which command is used by root to set or reset a password for any user. A user can use this command to reset their own password. what does the option -S do?
passwd -S --status displays 7 fields login name locked password date of last change minimum age maximum age warning period inactivity period ...ages are expressed in days
which command is an interface to the system reference manuals? what do the options -k, -K, -f, -t do?
man
- k searches for keywords and displays matches
- K search for text in all manual pages
- f =whatis displays a short description from the manual pages
- t formats in printable format
which command displays the amount of disk space available on the file system? Options -h, -i,
df -h human readable, -i lists inode information instead of block size
Which command estimates file space usage? Options -h, -c, -a
du -h human readable, -c produce a grand total, -a write counts for all files not just directories
Which command reports central processing unit statistics and input/output statistics for devices and partitions
iostat
what is the file extension for kernel module files…often found in /usr/lib/modules/
.ko
What is the configuration directory/file for modprobe?
/etc/modprobe.d = directory /etc/modprobe.conf = file
Which command is used to add and remove modules from the Linux Kernel? Options -a, -r
modprobe -a = to add modules -r to remove modules
Which command configures kernel parameters at runtime? Options -a, -w, -p, -e, -r
sysctl
- a = display all values currently available -w = when all arguments prescribe a key to be set
- p = –load - load in sysctl settings from a file specified
- e ignore errors
- r only apply settings that match a pattern.
Which command shows the status on modules in the linux kernel and their details?
lsmod
Which command displays information about a particular Linux Kernel module?
modinfo
Which command is a simple program to insert a module into the Linux Kernel?
insmod
Which command is a simple program to remove a module from the Linux Kernel?
rmmod
Which command generates module.dep and maps files? Creates a list of module dependencies by reading each module under /lib/modules/version.
depmod
Which two commands show a listing of last logged in users? Which one of these shows by default a log of the /var/log/btmp file, which contains all the bad login attempts?
last, lastb lastb shows the bad login attempts
Which log file in the /var/log/ directory will give you a complete picture of users logins at which terminals, logouts, system events and current status of the system, system boot time, etc.?
/var/log/utmp
Which log file in the directory /var/log/… give historical data of utmp?
/var/log/wtmp
Which log file in /var/log/… records only failed login attempts?
/var/log/btmp
What does sda1 mean?
sd = SCSI/SATA, a = first whole drive, 1 = first partition on drive
What are the common file attributes a, A, e, i
a = file can only be opened in append mode A = file can be opened without changing its atime (last opened time) e = file is using extents for mapping blocks on disk i = immutable cannot be deleted or renamed
which command repeats input back to user?
echo