Sample Questions - noyage/redhat GitHub Wiki

The UNIX filesystem

  • What is the executable bit on a file used for?
  • What is the executable bit on a directory used for?
  • What does "recursive" mean?
    • chmod -R 644 (directory)
  • Why is chmod 777 (filename) dangerous?
    • 777 will allow every user, every group and root to have full control of directories, files, etc
    • Would be a huge security risk and cause permission issues.
  • When would you use Extended file ACL's (Access Control Lists)
    • When you need more granularity than User/Group/Other
    • for example, you want to allow everyone in a group plus one other UID
    • /usr/bin/getfacl and /usr/bin/setfacl
  • What is a symbolic link?
  • How do you delete a symbolic link?
  • What is a hard link?
  • How can you tell if a file has a hard link?
  • Why bother having disk partitions?
  • What is the difference between /home/mike and home/mike ?
    • full path vs relative path
  • What is the difference between ./ and ../ ?
    • current directory vs parent directory
  • What does tilde ~ represent?
  • Given
$ ls -l /etc/passwd
-rw-r--r--. 1 root root 938 Apr 12 18:39 /etc/passwd
  • what does 938 represent?
  • If you did chmod 600 (file), what would the permissions be for this file?
  • What does the sticky bit do on a file?
  • What does the sticky bit do on a directory?

The UNIX Shell

  • How can you tell what shells are available on a system?
    • $ cat /etc/shells
  • Why is the environmental variable $PATH important?
  • Where is $PATH set?
    • /etc/profile
    • ~/.bashrc
    • ~/.bash_profile

Users/Groups

  • Why would an account not have a shell?
  • How can a user reset password?
  • How can someone with root access reset a user's password?
  • What is /usr/sbin/vipw?
  • How can you tell who is logged into a system?
    • /usr/bin/who
    • /usr/bin/last
    • /usr/bin/lastb
  • Logins via ssh are logged in /var/log/secure

Networks

  • Be able to disable DHCP and manually configure hostname, static IP address, gateway, netmask
  • What are the private (non-routable IP networks)?
  • What happens if you don't have a default gateway?
  • How can you test that your default gateway is working?

Secure Shell

  • ssh replaced the old "r" commands:
    • ssh replaces unencrypted remote access telnet, rsh, rlogin
    • scp replaces unencrypted file transfer rcp
  • Be able to disable password authentication and force users to use ssh keys
  • What's the difference between scp and sftp?

What OS am I using?

  • $ cat /etc/os-release works on any linux system
  • $ cat /etc/redhat-release works on RedHat systems
⚠️ **GitHub.com Fallback** ⚠️