System Access and the File System Flashcards
What is meant by console system access?
Direct access to the OS via video peripherals (VGA/DVI/HDMI)
What is meant by remote system access?
Connecting to a system over a network connection (Telnet/SSH) using IP address on port 23/22
How do you connect over SSH with a specific username?
‘ssh -l username ip_address’ or ‘ssh username@ip_address’
What is the command prompt symbol for a standard user?
$
What is the command prompt symbol for the root user?
#
What is contained in /boot
Boot loader files used by the system boot loader (grub.cfg)
What is contained in /root
The root users home directory
What is contained in /dev
System device files (disk/optical drive/audio/keyboard/mouse etc)
What is contained in /etc
Configuration files for all system components
What is contained in /bin -> /usr/bin
User commands for use within the terminal
What is contained in /sbin -> /usr/sbin
Optional 3rd party applications (not shipped with the OS)
What is contained in /proc
Running process files that only exist in memory
What is contained in /lib -> /usr/lib
C language libraries needed by the OS and applications
What is contained in /tmp
Directory for temporary files
What is contained in /home
System user home directories
What is contained in /var
System and application log files
What is contained in /run
System daemon files that start very early in the Linux launch process (systemd/udev etc) - stores temporary files during launch
What is contained in /mnt
Used to mount external file systems
What is contained in /media
Used for mounting CD-ROMS/ISOs
What is contained in /opt
Optional 3rd party applications (not shipped with the OS)
What letter denotes a file is a directory?
d
What symbol denotes a file is a regular file?
-
What letter denotes a file is a link?
l
What letter denotes a file is a device or special file?
c
What letter denotes a file is a socket?
s
What letter denotes a file is a named pipe?
p
What letter denotes a file is a block device?
b
What command is used for changing passwords?
passwd
How do you change the password for the current user?
Just type ‘passwd’
How do you change the password for a specific user?
sudo passwd user_id | <username></username>
How do you list files in chronological order?
ls -ltr (oldest at the top) or ls -lt (newest at the top)
How do you enable the ‘locate’ command to work properly?
Install package ‘mlocate’ and run ‘sudo updatedb’ to update the file system index
When should you run ‘sudo updatedb’?
When you have added/removed a file/directory from the file system
How are square brackets used as string wildcards?
[abc] finds anything containing ‘a’, ‘b’, or ‘c’ - requires **
How do you use wildcards symbols to match exact substrings?
abc matches exactly ‘abc’
What is an inode?
A pointer/number to a file on disk
What is the difference between soft and hard links?
A soft link is pointer to a file that points to an inode. A hard link points directly to an inode
What happens to soft links when the pointer file is deleted?
The soft link is also deleted
What happens to hard links when the pointer file is deleted?
The hard link remains pointing to the inode
How do you create a hard link?
ln /path/to/file /path/to/hard/link (the hard link path is created by the command)
What do hard links look like in a file list?
-rwxrwxrwx hard_link
What do soft links look like in a file list?
lrwxrwxrwx soft_link -> /path/to/linked/file
What command displays inode numbers?
ls -i
How does disk partitioning affect hard links?
Hard links must exist on the same disk partition