Paulo Gama
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # [ASR] - Teste Linux ## ATENÇÃO! COLOCAR APENAS RESPOSTAS CORRETAS! **Exemplo:** A pergunta é qual é a resposta certa? - Resposta Certa --- ## Links de ajuda (respostas online) - https://hackmd.io/yFafBBMfQL2CCr5lF1ZDOg (Resolução dos Labs da Bea). - https://quizlet.com/268065708/linux-flash-cards/ (99 respostas). - pucourse.com/linux-i-2-0/introduction-to-linux-i-final-comprehensive-exam-chapters-1-26-answers/ (108 respostas). - https://itexamanswers.net/introduction-to-linux-i-midterm-exam-answers-100-pdf-file-modules-1-14.html (70 respostas). - https://itexamanswers.net/introduction-to-linux-i-final-comprehensive-exam-answers-100-pdf-file-modules-1-27.html (135 respostas). --- The two login types are: - CLI and GUI The location of users' default shells is stored in the ______ file. - /etc/passwd Which of the following is not used for globbing? - # In what directory are yum repository configuration files stored? - /etc/yum.repos.d Which option to the fsck command will allow you to specify the filesystem type? - -t What option to the who command will display the current runlevel? - -r Which option to the fsck command forces a system check? - -f If you want to move up a line in vi command mode, you can press the Up Arrow Key ↑ or: - k Which of the following can be used to view details about USB devices? (choose two) - usb-devices - ls -usb -(ele vai dar como bonus esta, escolham so uma) Shell variables are used to: - Hold critical system information If you want to append content to a file with the normal output of a command, you can use: - >> Which command is used from the command line, to edit your disk's partition table? - fdisk When specifying a path, the __ character symbolizes the current directory. - . Which of the following options puts the cpio command into copy-in mode? - -i What commands can display a list of mounted file systems?(2 opcões) - mount - df For traditional init, the _____ file is where the initial default runlevel is defined. - /etc/inittab The rpm2cpio command can be used to: (choose two) - Extract files from a ".rpm" file - List the content of a ".rpm" file What directory contains information about symbolic links that enable services? Selecione uma opção de resposta: c. /usr/lib/systemd Which type of link can be made to a file on another filesystem, hard or soft? - soft To execute a command with the highest possible priority, which value do you pass to the nice command? - -20 A soft link is also called a _____ link. - symbolic. Environment variables cannot be created by which command? - set Which two commands will show detailed information about a Debian package? - apt-cache show - dpkg -s Which archiving method is compatible across Linux, Microsoft Windows and Mac operating systems? - zip Which option to the bzip2 command can be used to report the compression ratio of an archive? - -v In a command pipeline, the output of one command is sent to another command as output. - false The mkdir command cannot be used to: - Delete a directory. Which command is used to view the services that are set to start or stop automatically? Selecione uma opção de resposta: * chkconfig To execute a command called "cmd1" as a foreground process, you would type: - cmd1 gzip and bzip are aliases for the same utility. True or False? - false The same set of services are started or stopped at different runlevels. - False Which of the following are benefits of a shared library: (choose two) - Programs use a more consistent base of code - Programs can be smaller The ls command can list the contents of only one directory at a time. - False. Placing an __ character at the end of the command line will put the command in the background. - & Which type of link is indistinguishable by programs from regular files, hard or soft? - Hard How can you determine the RPM package that owns a file? - yum provides How can you remove a package using an rpm command? - rpm -e The third stage of the boot process is: - kernel phase The setuid permission on a file: - Causes the file to run under the owner's identity A device name of /dev/sda1 indicates this partition is on which type of device? - SATA To maintain timestamps when using the cp command, use: - -a Using the touch command and specifying a nonexistent file... - creates blank file with that name The command, chmod a+x will: - Add execute permissions for the user owner Which command can an administrator run to rebuild the cache of shared libraries? - ldconfig To view all current variables, you can use: - set The first stage of the boot process is: - The firmware (BIOS/UEFI) stage You wish to see an output of the devices on your system that are block-based. Which of the following will list them out? - lsblk Shell command man pages are typically located in section ___. - 1 If you are in vi command mode and want to begin inserting text at the end of the line, you can type: - A Which command can be used to send the output of a command to both stdout and a file - ls | tee /tmp/output In GRUB Legacy, the _____ directive indi es an operating system to boot if the default operating system fails to boot. - fallback= Which command will create disk labels on an ext3 filesystem? - ext3label (ta mal a resposta é **e2label**) Which command will remove consecutive duplicate lines from a file? - uniq What is the primary configuration file for yum? - /etc/yum.conf What version of GRUB is the most modern version? - GRUB 2 If you want to see the entire contents of a text file, you can use the _____ command: - cat Which option for the rm command will cause it to prompt before deleting files? - -i Virtualization software comes in both paid and open source variants: - true The systemd equivalent of runlevels are called? - targets Which option for the rm command will cause it to prompt before deleting files? - -i Which of the following is a non-interactive editor? - sed Which command is used to view the summary of the RAM and swap space? - free To see a list of commands that are available while viewing a man page, you can type the __ character. - h Which directory is used to store temporary files? - /tmp Which command is used to create a logical volume? - lvcreate To activate a swap space that has been initialized, you can execute: - swapon Which option to the fsck command forces a system check? - -f Container technology allows system designers to bypass traditional operating systems. - true Which utility can automate changes needed for a base virtual machine image? - cloud init (não tenho certeza mas os outros comandos pareciam parvos 95% certeza) Which command can change the user owner of a file? - chown What directory contains information about symbolic links that enable services? - /usr/lib/systemd What is NOT a purpose of using parentheses around parts of a regular expression? - They can be used to change the order that the pattern is evaluating Integrated peripherals are embedded into the _______ of a system: - Motherboard Which command is used to view the summary of the RAM and swap space? - free Which Linux distributions are derived from Red Hat? - fedora - centOS The rpm2cpio command can be used to: - List the content of a “.rpm” file - Extract files from a “.rpm” file What is the notification mechanism used to inform programs about a change in state of hardware devices? - HALD uses dbus to send notifications Which command is used to create a volume group? - vgcreate Which two directories are automatically searched for shared libraries? (choose two) - lib - /usr/lib What is the notification mechanism used to inform programs about a change in state of hardware devices? - HALD uses dbus to send notifications Which of the following are benefits of a shared library: - Programs use a more consistent base of code Which of the following is not a valid argument for the dd command? - in After running fdisk -cu /dev/sdb, what fdisk command will allow you to create a new partition? - n A _________ is a location that contains packages and metadata that can be used for queries, installation and updates of software on a system. - Repository The /bin directory contains: - The most fundamental commands that are essential for the operating system to function If you are in the vi command mode and want to begin inserting text before your cursor, you can type: - i What option to the fdisk command is used to display current partitions? - -l In GRUB Legacy, the _____ directive indicates an operating system to boot if the default operating system fails to boot. - fallback= The ______ command will display your current working directory. - pwd To display your current location within the filesystem, you can type: - pwd Which character at the beginning of a long listing indicates a directory? - d Commands are interpreted by the shell and transformed into actions by the kernel. - TRue For traditional init, the _____ file is where the initial default runlevel is defined - /etc/inittab Bundling utilities, management tools, and application software with a Linux kernel is called a: - A distribution of Linux Which command is used to create a physical volume? - pvcreate Which of the following commands can be used to scroll through a text file? - less Which directory is used to store temporary files? - /tmp If you are in vi command mode and want to add a new line after your cursor, you can type: - o Many commands that read text files will also read from this stream: - stdin The glob pattern [a-d] would match: - A file name with a single character that is either a a, b, c, or d. After running fdisk -cu /dev/sdb, what fdisk command will allow you to list the current partition table? - p Which of the following is a non-interactive editor? - sed The FHS sets which standard? - Which directories should be used to hold specific files Assuming everyone has access to the directory the file is in, who can view the contents of a file with permissions of rw-r----x? - Both the user owner and group owners To see the list of background processes that you have started in your shell, you can run: - jobs In what directory are you most likely to find user's home directories? - home A mount point is: - An empty directory that is used to access a filesystem\ The fourth stage of the boot process is: - init phase Which two commands will show detailed information about a Debian package? (choose two) - apt-cache show - dpkg -s Virtual memory is also referred to as: - swap The key press combination that will request a running process terminate: - CTRL C In which file are repositories stored for Debian package management? - /etc/apt/sources.list Which of the following will create a variable? - variable = value If you want to unmount a partition, which command should you use? - umount Using the setgid permission on a directory: - Causes new files created in the directory to be owned by the group that owns the directory What are the correct options for the rpm command to display a list of all installed packages? - -qa Assuming at least one file matching the pattern is in the current directory, the command echo ???a will display: - All of the files in the current directory that have four characters in the file name with the last character being an "a" character. bzip2 archives are typically indicated with which file extension? - bz2 The group ownership of a file may only be changed by: - Both the root user and the owner of the file Which of the following commands is used to view the summary of CPUs in the system? - lscpu Which directory is used to store files representing attached devices? - /dev Which directory structure contains the bulk of the operating system's files: - /usr Which directory structure has directories which may have heavy activity for services like mail, ftp, httpd and printing? - var For the rwxr-x--x permission set, the permissions corresponding to the three first characters (leftmost) belong to: - The user owner of the file The head -n -1 readme.txt command will: - Display all but the last line of readme.txt - What option to the fdisk command is used to display current partitions? - -l To search forward from your cursor in your vi document in command mode, you can type __ followed by the pattern to search for. - / A signal is: - A technique to tell a process to take some sort of action A pair of single quotes ' will prevent the shell from interpreting any special character. - true If you want to append content to a file with the normal output of a command, you can use: - >> If a library is not accessible due to an error, the ldd would report which error message? - not found This stream is the output of a command operating normally: - stdout Which of the following can be used to restart the HTTP service? (choose two) - service httpd restart - /etc/init.d/httpd restart The regular expression a* is equivalent to: - a{0,} Which regular expression character matches any one character? - . If you have a file named /tmp/hosts pointing to a file named /etc/hosts and the /etc/hosts file is deleted, then which of the following statements is true? - The /tmp/hosts file now points to nothing What determines how many files can be stored in a filesystem? - The number of inodes Which option to the bzip2 command can be used for recursive compression? - bzip2 doesn't support recursive compression Which command can change the user owner of a file? - chown To switch to another group, you must - Be a member of the group that you are switching to Which of the following contents is in the ldconfig configuration file by default? - include ld.so.conf.d/*.conf The _____ option to the uname command will display the kernel name. - -s To see how long the system has been running, you can use the _____ command. - uptime - Long command options are preceded by which two characters? - -- By default, the df command displays filesystem use in: - 1 K blocksize In GRUB Legacy, the _____ directive defines an operating system to boot. - title After running fdisk -cu /dev/sdb, what fdisk command will allow you to list the current partition table? - p You can combine glob characters in a single pattern, for example: a??*[0-9]. - true In order to run a command called "cmd1" in the background, you would type: - cmd1& The systemd equivalent of runlevels are called? - targets (acho que ja aqui tinha psoto esta xD) ass leite rsrsrsrsrsr mais vale a mais TRUEEEE What commands can display a list of mounted file systems? (choose two) - mount - df The names of hidden files begin with the ___ character. - . Which of the following is not a daemon used for logging? - ilogd (o prof tem lá logd - falta um i) Which directory is used to store essential libraries? - /lib If you want to move a character to the right in vi command mode, you can press the Right Arrow Key → or: - l Which command will display more information about globbing? - man 7 glob In GRUB Legacy, the _____ directive indicates how long to wait before automatically booting the default operating system. - timeout= Which of the following will find and load shared libraries when a program is executed? - The dynamic linker A bare-metal hypervisor runs directly on top of physical hardware - true What is the primary configuration file for yum? - /etc/yum.conf Placing an __ character at the end of the command line will put the command in the background. - & To use extended regular expressions, you can use: - egrep - grep -E Which of the following commands could be used to extract the archive, example.tar? - tar -xf example.tar A soft link is also called a _____ link. - symbolic Which option to the df command shows how many inodes are free in a filesystem? - -i Which of the following commands will take the standard output of the echo command and put it into the /tmp/output.txt file: - echo > /tmp/output.txt When you create a hard link, it increases the hard link count by one. - true The _____ command will search for files using a database of all files, which is generated on demand or scheduled. - locate Local variables are: - Only available to the shell they are created in The command, chmod 0777 /data will: - remove all special permissions Which command can change the user owner of a file? - chown Which programs have emerged to compete with and replace the traditional init process: - upstart - Systemd Which directories exist in the /etc/rc.d directory? - rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d and rc6.d What is the real location of the GRUB Legacy configuration file? - /boot/grub/grub.conf The second stage of the boot process is: - The Bootloader (LILO/GRUB) stage How can you determine the RPM package that owns a file? - yum provides What is the real location of the GRUB Legacy configuration file? - /boot/grub/grub.conf To copy the contents of a directory, use the following option(s) for the cp command: (choose two) - -r - -R Environment variables are: - Passed into other shells and commands What commands can display a list of mounted file systems? - mount - df The _____ command will display how much space a filesystem has free? - df To execute a command with the default priority, which value do you pass to the nice command? - 0 To search forward from your cursor in your vi document in command mode, you can type __ followed by the pattern to search for. - / If you want to initialize swap space that you've just created, which command would you run? - mkswap Container technology allows system designers to bypass traditional operating systems. - true By default the gzip command replaces uncompressed files with compressed files. - true To activate a swap space that has been initialized, you can execute: - swapon A device name of /dev/hda1 indicates this partition is on which type of device? - IDE Applications make requests to the kernel and receive resources, such as memory, CPU, and disk in return. - true What directory is used as a temporary mount point? - /mnt Which directory is used primarily for storing log messages? - /var/log The mv command will rename a file when a new directory is not specified. - true Two or more commands combined with the vertical bar | character between them form a: - pipeline Which command will merge two files together line by line? - paste What option to the mkfs command allows you to specify the type of filesystem to create? - -t The head -n -1 readme.txt command will: - Display all but the last line of readme.txt Which of the following files is for all bash shell users and executed every time a bash shell is opened? - /etc/bashrc What is the real location of the GRUB Legacy configuration file? - /boot/grub/grub.conf Which type of link can be made to directories, hard or soft? - soft Which of the following are considered replacements for the traditional init process? (choose two) - Sysinit - Systemd Which command is used to change permissions on a file? - chmod

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully