Linux+ Study2

Card Set Information

Author:
sethwalton
ID:
185473
Filename:
Linux+ Study2
Updated:
2012-12-06 18:55:49
Tags:
linux
Folders:

Description:
Questions for LX102
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user sethwalton on FreezingBlue Flashcards. What would you like to do?


  1. What files stores the default settings for new users ?
    /etc/default/useradd
  2. What file stores the default settings for new users in  /etc/shadow?
    /etc/login.defs
  3. What directory stores default hidden files for newly added users ?
    /etc/skel
  4. What does the -M option do for useradd  ?
    Adds user without a home directory.
  5. What does the -m option do for useradd ?
    create a home directory for the user.
  6. What does the -G option do for useradd or usermod ?
    list of supplementary groups.
  7. What does the -e option do for useradd or usermod?
    date on which the accoount will expire.
  8. What does the -f option do for useradd or usermod ?
    Days after a password expires until account is disabled.
  9. What does the -g option do for useradd ?
    Name or number of the user's primary group.
  10. What does the -s option do for useradd or usermod?
    specify the user's shell
  11. What does the -u option do for useradd or usermod ?
    manually specify the uid. (by number)
  12. What does the -r option do for useradd ?
    create a "system" account, same as --system
  13. What does the -p option do for useradd or usermod?
    specify crypt password.
  14. What does passwd -S <user> do ?
    report the password status for an account.
  15. What is the comand to unlock a password for a user ?
    passwd -u <user>; or --unlock
  16. What is the comand to lock a password for a user ?
    passwd -l <user>, or --lock
  17. What is the comand to delete a password for a user ?
    passwd -d <user>,  or --delete
  18. What does "passwd -m 3 <user>" do ?
    Sets the Minimum days before a password can be changed to 3 days, or --mindays
  19. What does "passwd -x 3 <user>"do ?
    This sets the maximum bumber of days a password remains and valid before it must be changed. or --maxdays
  20. What does "passwd -i 3 <user>" do ?
    Sets the number of days the can be accessed after expiration. or --inactive
  21. What does "passwd -w 3 <user>" do ?
    Set the number of days until a password change is required. or --warndays
  22. What does usermod -c "txt" do ?
    adds a comment to the user account "txt"
  23. What does "usermod -U ,user> " do ?
    unlock the user account; or --unlock
  24. What does the "usermod -d" do ?
    Allows you to specify a new home directory location
  25. What does "usermod -l <user> " do ?
    Specficy a new login name
  26. What does "userdel -r <user>" do ?
    Removes the user and home directory and mail spool entries.
  27. What does the -r option do for groupadd ?
    adds a system group
  28. What does the -g option do for groupadd ?
    Allows you to specify a GID
  29. What does the -p option do for groupadd ?
    Specify an encrypted  password.
  30. What does "groupmod -A "ksanders" dbusers" do ?
    Adds ksanders to the dbusers group.
  31. What does "groupmod -R "ksanders" dbusers" do ?
    Removes ksanders from the dbusers group.
  32. What is the global configuration file for ssh ?
    /etc/ssh/ssh_config
  33. What is the option to to tunnel X11 using ssh in the config file ?
    ForwardX11 yes
  34. What is the ssh option to enable X11 forwarding ?
    ssh -X
  35. What does ssh -f user@host do ?
    The -f tells ssh to go into the background just before it executes the command.
  36. What does ssh -N do ?
    the -N instructs OpenSSH to not execute a command on the remote system.
  37. What does ssh -L do ? What is the format ?
    The -L 2000:personal-server.com:25 is in the form of -L local-port:host:remote-port.
  38. Waht option is the ssh config file is needed for port forwarding ?
    AllowTcpForwarding yes
  39. What is the command to create gpg key ?
    gpg --gen-key
  40. What does GPG stand for ?
    Gnu Privacy Guard (GPG)
  41. What are 2 GPG front ends ?
    Seahorse and KGPG
  42. What file is  the GPG secret keyring?
    ~/.gnupg/secring.gpg
  43. What file is the gpg public keyring ?
    ~./gnupg/pubbring.gpg
  44. What file is the gpg trust database ?
    ~.gnupg/trustdb.gpg
  45. How does GPG work?
    GPG first generates a random symetric key and uses it to encrypt the message being sent.  The symetric key itself is encrypted using the recipients public key and sent along with the meaage.   When the recipient recieves the message GPG first decrypts the symetric key using the users private key then dycrypts the message using the prior encrypted symetric key.
  46. What Symetric encryptions does GPG support ?
    AES, 3DES, Blowfish
  47. What asymetric encryptions does GPG support ?
    Elgamal and RSA
  48. What hashes does GPG support ?
    MD5, SHA-1 and SHA-2, RIPEMD-160
  49. What digital signatures doe GPG support ?
    DSA and RSA
  50. What is the command to create an ssh rsa key pair ?
    ssh-keygen -t rsa
  51. What is the filename for a public ssh rsa key ?
    ~/.ssh/id_rsa.pub
  52. What is the name if the ssh public keys file?
    ~/.ssh/authorized_keys
  53. What is the command to start the ssh agent passphrase program ?
    ssh-agent bash
  54. What is the command to add a pass phrase to the ssh agent ?
    ssh-add ~/.ssh/id_rsa then supply the pass phrase
  55. What does ssh-agent -l do ?
    list stored pass phrases
  56. When using gpg --gen-key what information needs to be supplied ?
    • Type of Key DSA/RSA
    • size 2048 (default)
    • How long the the key should be valid (2yrs)
    • Real Name
    • Email address
    • Comment
    • passphrase
  57. What is the command to encrypt a file named mytestfile.txt for myuser using GPG ? And what is the resulting encrypted file name ?
    • gpg -e -r myuser mytestfile.txt
    • mytestfile.txt.gpg
  58. What is the command to decrypt a GPG file named mytestfile.txt.gpg to a name of mytestfile.txt ? What else needs to be provided ?
    • gpg --output mytestfile.txt --decrypt mytestfile.txt.gpg
    • or
    • gpg -o mytestfile.txt -d mytestfile.txt.gpg
    • the pass phrase.
  59. What is the command to export a public gpg key  for user myuser to a file gpg_myuser ?
    gpg --export myuser  > gpg_myuser
  60. What does ssh -Y do ?
    Enables trusted X11 forwarding.
  61. What does useradd -D do ?
    Shows what the defaults are for adding a new user.
  62. What is the option in /etc/ssh/ssh_config that controls requests for storing ssh keys? And what are the settings ?
    • StrictHostKeyChecking
    • yes - requires manually adding keys
    • ask - asks about new keys
  63. What is the ssh_config option that restricts users list from logging in ?
    • DenyUsers login1 login2
    • (separated by spaces)
  64. What is the ssh_config option that restricts all users  from logging in except ones listed ?
    • AllowUsers login1 login2
    • (separated by spaces)
  65. If a server has multiple addresses, what is the ssh_config option to restrict to 1 address:port combo
    ListenAddress x.x.x.x:x
  66. What file stores newly added user defaults ?
    /etc/default/useradd
  67. What is the command to change the password aging of mylogin to 3 minimum days, 30 maximum days and 7 warning days ?
    chage -m 3 -M 30 -W 7 mylogin
  68. What is the command to set an expriation date for mylogin to Jan 1st 2013 ?
    chage -E 2013-01-01
  69. What is the command to add a group dbusers?
    Option to specify a GID?
    Option to specify a password ?
    Option to specify a system group ?
    • groupadd dbusers
    • -g - Specify a GID
    • -p Specify a password "openssl passwd -crypt"
    • -r System group
  70. What is the command to remove a group called dbusers ?
    groupdel dbusers
  71. What is the command to remove a login mylogin from the system and all file even if not owner buy mylogin ?
    userdel -fr mylogin
  72. In the/etc/shadow what are each of the fields ?
    mylogin:*:14839:0:99999:7:::
    What does the * mean ?
    • Username mylogin
    • encrypted password  (*) means the account can't login
    • last modified 14839    days since 1/1/1970
    • Min days 0   before password can change
    • max days 99999   must change password
    • days warning about password change 7
    • disabled days ::
    • days to wait after expriy to disable the account
    • expire ::     days since 1/1/1970 until account will be disable, blank is never
  73. What are each of the fields in /etc/passwd?
    myuser:x:1004:1005::/home/myuser:/bin/bash
    • Username : myuser
    • password x >> /etc/shadow
    • UID : 1004
    • GID : 1005
    • Full Name : :
    • Home Directory : /home/myuser
    • Default Shell /bin/bash
  74. What is the range if UIDs reserved for system accounts ?
    0-499
  75. What are the fields for the /etc/group entry ?

    mygroup:x:1004:monkeys:
    • format
    • Group:Password:GID:Users
  76. What is the command to import a gpg public key file gpg_myuser.pub  to the key ring ?
    gpg --import gpg_myuser.pub
  77. What is the command to list all gpg keys ?
    gpg --list-keys
  78. What adaptive technology allows users to lock modifier keys so only one finger is required ?
    StickyKeys
  79. What adaptive technology enables key sequences to the mouse cursor on the screen and send clicks ?
    MouseKeys
  80. What adaptive technology must hold a key down for a period of time before the key stroke is actually sent - to prevent errors ?
    SlowKeys
  81. What adaptive technology Sounds an audible alert if either CAPS LOCK Or NUM LOCK key is on ?
    ToggleKeys
  82. What adaptive technology configures the time before a held key repeats ?
    RepeatKeys
  83. What adaptive technology inserts a delay before keystroke ?
    BounceKeys and DelayKeys
  84. What adaptive technology sends double click when holding down the primary mouse button for a specified time ?
    Simulated secondary click
  85. What adaptive technology  sends mouse click whenever the mouse pointer stops moving for a specified time ?
    Dwell click
  86. What is the location of the xdm configuration files ?
    /etc/X11/xdm/xdm-config
  87. What is the location of the kdm configuration files ?
    /etc/kde/kdm or /etc/X11/kdm
  88. What is the location of the gdm configuration files ?
    /etc/X11/gdm or /etc/sysconfig/displaymanager
  89. What is the command to enter the MySQL database as root from the local host.
    mysql -h localhost -u root -p
  90. What is the MySQL command to see all administered databases?
    SHOW databases;
  91. What is the MySQL command to enter a particular database bookstore ?
    USE bookstore;
  92. What is the MySQL command to delete a table books?
    DROP TABLE IF EXISTS books;
  93. What two MySQL commands to see the field structure of a table books?
    • EXPLAIN books;
    • or
    • DESCRIBE books;
  94. What is the MySQL command to display all entries in a table books?
    SELECT * FROM books;
  95. What is the option  -P  for lpr ?
    •  lpr -P printer_name file_name   
    • Prints files to the named printer.
  96. What are the options -m, -q and -r  for lpr?
    • -m Send email upon job completion.
    • -qHold (or queue) the job for later printing
    • -rRemove the file after it has been spooled for printing.
  97. What are the options for lpr ? -C, -J, -T,
    • -C, -J, or -T "name"
    • Set a job name.
  98. Explain the declare options -a, -f, -x, -r -i
    • declare
    • -a indicies >> arraydeclare
    • -f function_name >> functiondeclare
    • -x var3 >> export declare
    • -r var1 >> read only declare
    • -i var2 >> integer
  99. What command will scan for open TCP ports on myhost?
    • nmap -sT myhost
    • (-s) scan
    • (TCP)
  100. What command will scan for open UDP ports on myhost?
    • nmap -sU myhost
    • (-s) scan
    • (-U) UDP
  101. What is the iptables command to list the rules in all chains for table filter?
    iptables -t filter -L
  102. What does the following do ?
    iptables -t filter -A INPUT -s 0/0 -p icmp -j DROP
    • drop all incoming ICMP packets
    • -t table
    • -A chain (INPUT, FORWARD, OUTPUT)
    • -s 0/0 addresses/mask (0 = any)
    • -p protocol
    • -j target (DROP, REJECT, ACCEPT)
  103. What does the following iptables command do ?
    iptables -t filter -A INPUT -s 0/0 -p tcp --dport 80 -j DROP
    • Drop all incoming tcp traffic destine for HTTP sever on port 80
    • --dport = destination port
  104. What is the command to clear all iptables ?
    iptables -F
  105. What is the command to set iptables chain INPUT to a default policy to DROP ?
    iptables -P INPUT DROP
  106. What does the crontab entry do ?
    1 0 * * * printf > /var/log/apache/error_log
    The following line specifies that the Apache error log is to be cleared at one minute past midnight (00:01) of every day of the month, of every day of the week.
  107. What does the following crontabl entry do ?
    0 */2 * * * /home/username/test.pl
    The following line causes the user program test.pl – ostensibly a Perl script – to be run every two hours, namely at midnight, 2am, 4am, 6am, 8am, etc...
  108. Name these crontab fields:
    * * * * * command to be executed
    • * * * * * command to be executed
    • ┬ ┬ ┬ ┬ ┬
    • │ │ │ │ │
    • │ │ │ │ │
    • │ │ │ │ └───── day of week (0 - 7) (0 or 7 are Sunday, or use names)
    • │ │ │ └────────── month (1 - 12)
    • │ │ └─────────────── day of month (1 - 31)
    • │ └──────────────────── hour (0 - 23)
    • └───────────────────────── min (0 - 59)
  109. What 2 commands check the status of the at daemon ?
    • rcatd status
    • /etc/init.d/atd status
  110. What command will run a command getit  5 minutes in the future ?
    • at now +5 minutes
    • > getit
    • ctrl D
  111. What command checks the status of a waiting "at" command ?
    atq
  112. What will run a command doit at 2pm tomorrow ?
    • at 2pm tomorrow
    • >doit
    • ctrl D
  113. What is the command to remove all cron jobs ?
    crontab -r
  114. What is the command to show all configured cron jobs ?
    crontab -l
  115. What command removes an "at" job from the que?
    atrm <job id>
  116. What is the ifcfg-eth0 that determines if the interface uses DHCP or is manually assigned ? What are thsoe settings ?
    • BOOTPROTO='static'
    • BOOTPROTO='dhcp'
  117. What is the command to assign eth0 a new address of 192.168.1.95 with a subnet mask of 255.255.255.0 and a broadcast address of 192.168.1.255?
    ifconfig eth0 192.168.1.95 netmask 255.255.255.0 broadcast 192.168.1.255
  118. What does the netstat -s command show ?
    A summary of IP statistics.
  119. What does the netstat -l command show ?
    All open and listening sockets.
  120. What is the command to create a cups login root with a  password?
    • lppasswd -g sys -a root
    • -g <group>
    • -a <login>
  121. What is the url to the cups server configuration?
    http://localhost:631
  122. What is the shell command to send a file mytestfile.txtx to a printer HPLJ?
    lp -d HPLJ mytestfile.txt
  123. What is the difference in time for NTP that is considered "insane" time?
    17 minutes.
  124. What are three commands to one time syncronize the local server to an remote NTP provider us.pool.ntp.org ?
    • ntpdate us.pool.ntp.org  < depriciated
    • rcntp ntptimeset <<assumes server in ntp.conf is set
    • sntp -s us.pool.ntp.org
  125. What is the command initially configure MySQL ?
    Then start the daemon?
    • mysql_install_db
    • ./etc/init.d/mysql start
  126. What is the command to see the MySQL version ?
    mysqladmin version -p
  127. What is the command to assign a password to the root user in MySQL ?
    mysqladmin -u root password 'password'
  128. What is the command to make a new database called customers in MySQL?
    CREATE DATABASE customers;
  129. Explain the options for the lp command :
    -n, -m, -q
    • lp:
    • -n = number of copies  
    • -m emails confirmation to local user account
    • -q sets priority
    • -o landscape
    • -o sides=2
  130. What is the name of the CUPS configuration file ?
    /etc/cupsd.conf
  131. What is the command to display all information about all CUPS printers on the system ?
    lpstat -t
  132. What are the two possible paths for fonts installed on a Linux system ?
    • /usr/share/X11/fonts
    • or
    • /usr/share/fonts
  133. What are the two different types of scalable fonts ?
    • TrueType
    • and
    • PostScript
  134. What command creates an index of scalable font files for X11? What file does it create ?
    mkfontscale reads all of the scalable font  files in the directory.  For every font file found, an  X11  font  name   (XLFD)  is  generated,  and is written together with the file name to a file fonts.scale in the directory.
  135. What command creates an index of X font files with an input file of fonts.scale?
    mkfontdir
  136. What firewall port need to be opened for a font server ?
    7100
  137. What config file need to edited to enable tcp listen for a x font servers ?  What option need to be changed ?
    • edit /etc/X11fs/config
    • Pound out "no-listen = tcp"
  138. What is the name of the daemon for X font server ?
    xfs
  139. What needs to be added to the xorg.conf file to enable a x font server ?
    • edit /etc/X11/xorg.conf
    • Add to the "files section"
    • Section "Files"
    • .... 
    • FontPath "tcp/server_address:7100"
    • ....
    • EndSection
  140. Using the test function in bash script or [ ]  explain
    give the options for comparing $STRING1 and $STRING2, for both equal and not eqla.
    • test "$STRING1" = "$STRING2"; echo $?
    • test "$STRING1" != "$STRING2"; echo $?
  141. Using the test function in bash script or [ ]  explain give the options for comparing $INT1 and $INT2, for both equal and not equal, less than, greater than, greater than or equal to, less than or equal to.
    • test $INT1 -eq $INT2; echo $?
    • test $INT1 -ne $INT2; echo $?
    • test $INT1 -lt $INT2; echo $?
    • test $INT1 -gt $INT2; echo $?
    • test $INT1 -ge $INT2; echo $?
    • test $INT1 -le $INT2; echo $?
  142. Using the test function in bash script or [ ]  explain give the options for testing files:
    FILE exists and is a directory?
    FILE exists     
    FILE exists and is a regular file 
    FILE exists and is set-group-ID 
    FILE exists and is a symbolic link
    FILE exists and has its sticky bit set
    FILE exists and is owned by the effective user ID        FILE exists and is a named pipe
    FILE exists and read permission is granted
    FILE exists and has a size greater than zero
    FILE exists and its set-user-ID bit is set
    FILE exists and write permission is granted 
    FILE exists and execute (or search) permission is granted
    • -d exists and is a directory
    • -e  exists      
    • -f exists and is a regular file
    • -g exists and is set-group-ID  
    • -h exists and is a symbolic link (same as -L)
    • -k exists and has its sticky bit set       -L 
    • -O exists and is owned by the effective user ID
    • -p exists and is a named pipe
    • -r exists and read permission is granted     
    • -s exists and has a size greater than zero
    • -u exists and its set-user-ID bit is set
    • -w exists and write permission is granted
    • -x exists and execute (or search) permission is granted
  143. What is the command to add a default route of 192.168.1.254?
    route add default 192.168.1.25
  144. What is the command to add a route to network 192.168.2.0 mask /24 to gateway 192.168.2.254?
    route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.254
  145. What is the format of an IPV6 address ?
    • IPV6 addresses are composed of eight four character hexadecimal numbers separated by semi colons.
    • 35BC:FA77:4898:DAFC:200C:FBBC:A007:8973
  146. What are the three private IP (v4) address ranges for Class A, B and C ?
    • private address ranges are :
    • 10.0.0.0 - 10.255.255.255 (Class A)
    • 172.16.0.0 - 172.31.255.255 (Class B)
    • 192.168.0.0 - 192.168.255.255 (Class C)
  147. What are the three public address ranges for Class A, B, and C ?
    • Public address ranges :
    • Class A 1-126.x.x.x       00000001-01111111
    • Class B 128-191.x.x.x   10000000-10111111
    • Class C 192-223.x.x.x   11000000-11011111
  148. Explain the lpstat options, -a, -c, -p -s.
    • Options for lpstat
    • -a    Display accepting status of printers.
    • -c    Display print classes.
    • -p    Display print status: enabled or disabled
    • -s    Display default printer, printers, and classes. Equivalent to -d -c -v.
  149. What are the 2 commands to enable and disable cups printing ?
    cupsenable and cupsdisable.
  150. What is the command to view all printer ques ?  for just one printer ?
    • lpq or lpq -a for all printers
    • lpq -p <printername> for just one
  151. What are the 2 commands that remove a print job from the que. Which command and option removes all jobs ?
    • lprm <job id> or cancel <jobid>
    • cancel -a removes all jobs
  152. What is the command to set the default printer ?
    lpoptions -d <printername>
  153. What are the commands to enable or disable a print que for a specific printer ?
    • cupsaccept <printername>
    • cupsreject <printername>
  154. What the file location for the cups print que ?
    /var/spool/cups
  155. What is the file location of defined printers ?
    /etc/cups/printers.conf
  156. What is the file location of cups filters ?
    /usr/lib/cups/filter
  157. What is the file location of cups backend ?
    /usr/lib/cups/backend
  158. What is the file location of the PostScript Printer description files ?
    /etc/cups/ppd
  159. In the cupsd.conf file what are these options for :
    ServerName, Server Admin, DocumentRoot,
    LogLevel, MaxCopies, MaxJobsPerUser, User
    Group, MaxClients, Browsing, BrowseAddress, BrowseAllow, BrowseDeny
    • ServerName << Server Name Announced to Clients Server Admin << email address users can use to contact the CUPS administrator
    • DocumentRoot << Specifies the directory where douments are located
    • LogLevel << none, error , warn, info, debug, debug2 MaxCopies << limit on single print jobMaxJobsPerUser <<active jobs
    • User <<user cupsd runs as
    • Group << specifies the cupsd group
    • MaxClients << number of connections, default is 100 Browsing << Whether cupsd advertizes BrowseAddress << Broadcast addressBrowseAllow or BrowseDeny << all none hostname.domain *.domainname IPaddress/netmask @LOCALBrowseInterval between announcements default is 30 second
  160. What is the command to remove a printer from cups?
    lpadmin -x <printername
  161. What is the option for reverse lookup using dig ?
    What does the +short otpion do ?
    • dig -x 209.132.183.81 +short, abbrievates the findings to just the name :
    • sethwalt@corp-suse:~> dig -x 209.132.183.81 +short
    • www.redhat.com.
  162. What does this command produce :
    dig redhat.com mx +noall +answer centos.org ns +noall +answer
  163. What  variable is defined, its value is used and the values assigned to all other LC variables are not checked?
    LC_ALL
  164. What does the locale command do ?  What are the options -a and -m used for?
    • locale summarizes the current locale environment for each locale category defined by the LC_* environment  variables.      
    • -a, --all-locales Write names of available locales.  
    • -m, --charmaps
  165. Where are the defaults for /etc/shadow stored ?
    /etc/login.defs
  166. If the password of a login has "*" in /etc/shadow what does that mean ?
    (*) means the account can't login
  167. What is the range of UID's reserved for system accounts ?
    UID's 0-499 are reserved for system accounts
  168. What are the TCP and UDP ports (20, 21, 22, 23, 25, 53, 80,110, 119, 139, 143, 161, 443, 993, 995)?
    • FTP 20, 21
    • Open SSH 22
    • Telnet 23
    • SMTP 25
    • DNS 53
    • HTTP 80
    • POP3 110
    • NNTP 119  Network News Transfer protocol
    • SMB and NetBIOS 139
    • IMAP 143
    • SNMP 161, 162
    • HTTPS 443
    • IMAP over TLS/SSL 993
    • POP3 over TLS/SSL 995
  169. What are the options for the command su, -c -l -s -m ?
    • -c command to run
    • -l use enviroment of new user (same as -)
    • -s which shell to use
    • -m preserver current environment
  170. What daemon uses /etc/hosts.allow and /etc/hosts.deny ?
    tcpd
  171. What would you enter in the /etc/hosts.deny file to disallow all access to vsftpd ?
    vsftpd : ALL
  172. What would enter in the /etc/hosts.allow file to allow access for vsftpd for only 192.168.2.10 and 192.168.2.110 ?
    vsftpd : 192.168.2.10,192.168.2.110
  173. What is the name of the daemon that is responsible for logging kernel messages ?
    klogd
  174. What are the options -i, -s and -f for the command logger do ?
    • -i       Log the process id of the logger process with each line.    
    • -s       Log the message to standard error, as well as the system log.    
    • -f file  Log the specified file.
  175. What is the key sequence to kill Xserver?
    CTRL-ALT-BACKSPACE
  176. What is the name of the tools to fine tune Xserver?
    xvidtune
  177. What does the .xinitrc file do ?
    The xinit command uses a customizable shell script file that lists the X Client programs to start. The .xinitrc file in your home directory controls the windows and applications that start when you start x
  178. What is the text base xorg configuration tool called ?
    xorgconfig text based configuration utility to configure video board, monitor, resolution depth etc ...
  179. What is the xorg configuration tool that creates a configuration file in root's home directory ?  What is the name of the file ?
    Xorg -configurecreates a hardware configuration file at /root/xorg.conf.new
  180. What is the command to test an xorg config file without installing it ?  If it works where should the config file be copied to ?
    • X -config /root/xorg.conf.new to test it If OK
    • then mv /root/xorg.conf.new /etc/X11/xorg.conf
  181. What is the name of the graphical xorp config tool ?
    xorgcfg -  graphical version of xorgconfig
  182. What is the location of the xorg config file ?  Xfree86?
    • for X.org  /etc/X11/xorg.conf
    • for XFree86 /etc/X11/XF86Config
  183. In the xorg.conf file what does the option AllowMouseOpenFail do ?
    Allows the system to boot even if a mouse is not found.
  184. What is the Xfree86 configuration tool that creates a configuration file ?  What is the location and name of the file ?
    Xfree-86 -configure - detects hardware and creates a file named /etc/X11/XFConfig.new
  185. What is the name of the Xfree86 text based configuration tool ?
    xf86config - text based config tool
  186. What is the name of the xfree86 graphical configuration tool ?
    xf86cfg - graphical uitily
  187. What is the name of the Redhat based x graphical configuration tool for display, keyboard, and mouse?
    • Redhat  
    • system-config-display 
    • system-config-keyboard 
    • system-config-mouse
  188. What does the xwininfo utility do ?
    Xwininfo  is a utility for displaying information about X windows.  Various information is displayed depending on which options  are  selected, position, font, size etc..
  189. What does the xdpyinfo utility do ?
    xdpyinfo -  a utility for displaying information about an X server.  It is  used to examine the capabilities of a server, the predefined values for various parameters used in communicating between  clients  and the server,  and the different types of screens and visuals that are available.
  190. What are the commands to stop and start the gdm display manager ?
    • /etc/init.d/gdm stop * Stopping GNOME Display Manager...                                    
    • /etc/init.d/gdm start * Starting GNOME Display Manager...
  191. How is the display manager greeting changed ?
    • Change the display manager greeting
    • edit /etc/X11/xdm/Xresources

    • change entry :
    • xlogin*greeting:        Welcome at CLIENTHOST
  192. How do you change the default color depth for the display manager xdm?
    • edit /etc/X11/xdm/Xservers
    • change
    • :0 local /usr/bin/X -nolisten tcp -br vt7
    • to
    • :0 local /usr/bin/X -nolisten tcp -br vt7 -bpp 16
    • restart xdm
  193. What needs to be removed from the line
    :0 local /usr/bin/X -nolisten tcp -br
    For remote x sessions?
    What file is this located in ?
    What firewall port needs to opened ?
    • change
    • :0 local /usr/bin/X -nolisten tcp -br vt7 -bpp 16
    • to
    • :0 local /usr/bin/X tcp -br vt7 -bpp 16
    • /etc/X11/xdm/Xservers
    • open port 177
  194. What is the location of the xdm, gdm and kdm configuration files ?
    • /etc/X11/xdm/xdm-config
    • kde and gnome can use their own
    • /etc/kde/kdm or /etc/X11/kdm
    • /etc/X11/gdm
  195. What is the range of  well known  ports ?
    0-1023
  196. What is the range of registered ports ?
    1024-49151
  197. What is the range of dynamic ports ?
    49152-65535
  198. What port does NTP use ?
    123
  199. Explain NTP stepping, slewing, insane time, drift, and jitter.
    • Stepping - time adjustments if the time difference is larger than 128 ms less than 17 minutes
    • Slewing - gradual adjustment if the time if off by less that 128 ms
    • Insane time - if the time off by more than 17 minutes it won't adjust
    • Drift - measure of incidental clock frequency error.  Jitter - estimated time difference between the consumer and povider since the last poll.
  200. What are the two options using hwclock to set the system time from the hardware clock ?
    -s or --hctosys
  201. What are the two options using hwclock to set the hardware clock from the current system time?
    -w or --systohc
  202. What is the command to read the time from the system's hardware clock ?
    hwclock -r (or --show)
  203. Which loop will continue to process until the condition evaluates to False? True?
    • A While loop will continue to process until the condition evaluates to false
    • A Until loop will continue to process until the condition evaluates to true.
  204. What are the options for ulimit, -f, -n -t , -u, -d, -m, -S, -H, and -a ?
    • -f Sets a limit on the maximum size (in blocks) of files created by the shell
    • -n Sets a limit on the maximum number of open file descriptors
    • -t Sets a limit on the maximum amount of cpu time (in seconds) a process may use
    • -u Sets a limit on the maximum number of processes available to a single user
    • -d Sets a limit on the maximum size (in KB) of a process data segment in RAM
    • -m Sets a limit on the maximum resident size (in KB) of a process in RAM
    • -H Sets a hard resource limit -S Sets a soft resource limit
    • You can use the -a option with the ulimit command to view the current value for all resource limits.
  205. What is the form of the /etc/security/limits.conf file?
    what is the @ used for ?
    *?
    • <domain>  <type> <item> <value>
    • Where domain can be a user login or @group name
    • type is hard or soft
    • item is the obect being restricted
    • and value is the numerical value.
  206. What are the 2 files to control access to at command ?
    • /etc/at.allow << users listed in this file are allowed to use at
    • /etc/at.deny  << users listed in this file are not allowed to use at
  207. What are the two possible command to set the timezone from the command line ?
    tzselect and tzconfig
  208. What does export -p do ?
    When  -p  is  specified,  export shall write to the standard output the  names and values of all exported variables.
  209. Using the $PS1 shell variable, what does u, h and w provide?
  210. What type of shell script loop will continue to process until the condition evaluates to false?
    while loop : (while still true)

    • while <condition> do   
    • <script commands>
    • done
  211. What type of shell script loop will continue to process until the condition evaluates to True?
    until loop : (until true)

    • until <condition> do   
    • <script commands>
    • done
  212. Create a script to display "monkeys-x" from 1 to 15 using a for loop.
    • for i in {1..15} do  
    • echo "monkeys"$1
    • done
  213. What is the command to display numbers from 0 to 100 by increments of 5 ?  0,5,10,15 etc...
    seq 0 5 100
  214. What does the command "seq 16" do ?
    displays numbers from 1 to 16 incremented by 1
  215. What port do remote Xstations use ?
    177
  216. in MySQL what does the JOIN command do ?
    JOIN takes data from 2 tables with same entry and display asscoiated fields.

    mysql> SELECT a.tutorial_id, a.tutorial_author, b.tutorial_count    -> FROM tutorials_tbl a LEFT JOIN tcount_tbl b    -> ON a.tutorial_author = b.tutorial_author;+-------------+-----------------+----------------+| tutorial_id | tutorial_author | tutorial_count |+-------------+-----------------+----------------+|           1 | John Poul       |              1 ||           2 | Abdul S         |           NULL ||           3 | Sanjay          |              1 |+-------------+-----------------+----------------+
  217. In MySQL what deos the GROUP command do ?
    Organizes data by type.

    • mysql> SELECT type FROM products GROUP BY  type
    • ;+----------+| type     |+----------+| Book     | | Clothing | | Music    | | Toy      |
  218. What are the two commands needed to automate login with passphrase for SSH ?
    • >ssh-agent bash
    • >ssh-add ~.ssh/id_rsaenter passphrase: xxxxxxx "Identity added "
  219. What command would take an input file infile and convert from ISO-8859-1 to UTF-8 and output to output file outfile?
    iconv -f iso-8859-1 -t utf-8 <infile >outfile
  220. What is the command to set the time and date to October 2nd 2006 6PM ?
    date -s "2 OCT 2006 18:00:00"
  221. What is the command to set the date to November 28th 2008 ?
    date +%Y%m%d -s "20081128"
  222. What is the command to set the time to 10:13 AM and 13 seconds ?
    date +%T -s "10:13:13"
  223. What is information is contained in /var/log/boot.log and /var/log/boot.msg ?
    • boot.log entries from daemons as they were started.
    • boot.msg messages displayed on screen during boot.
  224. What is information is contained in /var/log/lastlog and /var/log/faillog ?
    • faillog - failed authentication attempts
    • lastlog - last login information
  225. What is the syntax for the /etc/syslog.conf file ?
    • The syntax for syslog.conf file is
    • facility.priority  filename

    * is all
  226. What is an entry to in/etc/syslog.conf to send all syslogging to a remote server at 192.11.13.15?
    entry send all remotely :

    *.*              @192.11.13.15
  227. Explain the options, -l, -u and -m for the command faillog.
    • -u specify user 
    • -m, or --maximum Set maximum number of login failures after the account is disabled     
    • -l , or --lock-time Lock account to SEC seconds after failed login.
  228. What is the name of the file that if present, noone can login?
    /etc/nologin
  229. Explain the following mail commands : t, d, u, n, e, R, r, m, q.
    • mail commands:
    • t <mesage number> read a message
    • d <message number> delete a message
    • u <message number> undelete a message
    • n next
    • e <message number> edit a message
    • R <message number> reply
    • r <message number> reply to all
    • m <address> send new message
    • q quit
  230. What is the command to view all unread messages in your mail ?
    mailq
  231. What is the format of /etc/aliases
    format:

    alias: realemailaddress
  232. Explain the options -s, -t -u for the lsof command.
    • lsof - list all open files
    • -s Displays file sizes.
    • -t Specifies that lsof should produce terse output with process identifiers only and no header. This is useful if you are piping the output of lsof to the kill command.
    • -u user_name Displays only open files associated with the specified user
  233. What is the option in the /etc/sudoers file that specifies whos is allowed to run a command ?
    User_Alias specifies Who is allow to run commands
  234. What is the option in the /etc/sudoers file that specifies comands allowed to run ?
    Cmnd_Alias the commands those users are allowed to run
  235. What is the option in the /etc/sudoers file that specifies what hosts the command can be run on?
    Host_Alias Hosts users are allowed to run on.
  236. What is the format for the /etc/sudoers file for aliases ?
    Alias_Type NAME = item1, item2, ...
  237. What is the command to edit the sudoers file ?
    visudo
  238. What is the option in the /etc/sudoers file that specifies what login the command should be run from ?
    Runas_Alias usernames commands may be run as.
  239. Explain the options, -a, -i -l, -s and -r for the netstat command.
    • netstat --help 
    • -a, --all, --listening   display all sockets (default: connected) 
    • -i, --interfaces         display interface table 
    • -l, --listening          display listening server sockets   
    • -s, --statistics         display networking statistics (like SNMP)       
    • -r, --route              display routing table
  240. What does the newaliases command do ?
    Newaliases rebuilds the random access data base for the mail aliases file /etc/aliases. It must be run each time this file is changed in order for the change to take effect.
  241. What does the /etc/X11/xdm/Xaccess file provide?
    Access control file for XDMCP connections
  242. What does the command do ?

    ssh -N -p 22 bob@mylinuxserver.xxx -L 2110:localhost:110
    • Where:
    • -N= Do not execute a remote command
    • -p 22= External SSH port 22. 
    • my home SSH serverbob@mylinuxserver.xxx= username@hostname(or ip address)
    • -L 2110/localhost/110 = Bind information. Broken down as such:client-port:hostname:hostport -

    In this example your binding POP3 on the server to your localhost port 2110
  243. What is the location of the exim config file ?
    /etc/exim/exim.conf
  244. What are the options -a, -i -l, -s and -r for the netstat command ?
    • netstat 
    • -a, --all, --listening   display all sockets (default: connected)       
    • -i, --interfaces         display interface table       
    • -l, --listening          display listening server sockets        -s, --statistics         display networking statistics (like SNMP)       
    • -r, --route              display routing tabl
  245. What are the options -i, -s, -c for the ping command ?
    • -i interval
    • -s size
    • -c count
  246. What are the options -p, -i -m for traceroute ?
    • -p port
    • -i interface
    • -m max hops
  247. What is the postfix configuration file ?
    /etc/postfix/main.cf
  248. What is the command to find all file with the SUID bit set ?
    find / -type f -perm -u=s -ls
  249. What is the command to find all file with the GUID bit set ?
    find / -type f -perm -g=s -ls
  250. If and LC_variable has a null value what variable is then used ?
    LANG
  251.  What file is a list of all times zones stored ?
    a list of all avaialable time zones is stored in /etc/share/zoneinfo
  252. What 2 files is current time zone stored in ?
    current time zone : /etc/timezone or /etc/sysconfig/clock
  253. What is the command to start KDE in run level 5 ?  Gnome ?
    • start kde = /usr/bin/startkde
    • start gnome = /usr/bin/gnome
  254. What is the directory for Type1 Fonts ? TrueType fonts ?
    • Directory for Type 1 fonts :
    • /usr/share/fonts/Type1             
    • TrueType :
    • /usr/share/fonts/truetype
  255. Which of the hidden config for X are used form run leve 3 ?  runlevel 5 ?
     .xinitrc
    .Xsession
    .Xdefaults
    .Xclients
    • Hidden x config files :
    • .xinitrc (run level 3)
    • .Xsession (run level 5)
    • .Xdefaults (run level 5)
    • .Xclients (run level 5)
  256. Which parameter in the ifcfg-eth0 script controls when an interface is started ?  What are the possible options ?
    • ifcfg-eth0 : STARTMODE="auto"  
    • other options : onboot, manual
  257. What is the command to request an interface to retrieve a DHCP IP address?
    dhclient eth0 -v
  258. What is the command to set a cups password ?
    set a cups password : lppassword -g sys -a username
  259. What is the command to set the default printer ?
    lpoptions -d defaultprinter

What would you like to do?

Home > Flashcards > Print Preview