Windows Command Prompt

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By PremierGaou
P
PremierGaou
Community Contributor
Quizzes Created: 3 | Total Attempts: 53,871
Questions: 25 | Attempts: 4,365

SettingsSettingsSettings
Windows Command Prompt - Quiz

The windows command prompt is essential to the functioning of a computer. It might not be as simple or complex as you think so just try it out and see for yourself. All the best as you attempt.


Questions and Answers
  • 1. 

    What is the SC command?

    • A.

      Schedule command

    • B.

      System checker

    • C.

      Screen clear

    • D.

      Service control

    Correct Answer
    D. Service control
    Explanation
    The SC command refers to the service control command. This command is used in Windows operating systems to manage and control installed services. It allows users to start, stop, pause, resume, or query the status of a service. By using the SC command, administrators can easily manage and control various services running on their system, making it a crucial tool for system administration.

    Rate this question:

  • 2. 

    Which command do you use to change file extensions?

    • A.

      Assoc

    • B.

      Ftype

    • C.

      Cacls

    • D.

      Attrib

    Correct Answer
    A. Assoc
    Explanation
    cacls will change file permissions. attrib will change file attributes. ftype will display or change the link between a FileType and an executable program.

    Rate this question:

  • 3. 

    Which command do you use to relocate a file to another folder?

    • A.

      Copy

    • B.

      Move

    • C.

      Mv

    • D.

      Ren

    Correct Answer
    B. Move
    Explanation
    copy will make a copy of the file while leaving the original in its location. mv is the Linux command for moving files. ren will rename the file.

    Rate this question:

  • 4. 

    What command do you use to delete folders?

    • A.

      Del

    • B.

      Rm

    • C.

      Rd

    • D.

      Rmdir

    Correct Answer
    D. Rmdir
    Explanation
    The command rmdir is used to delete empty directories (folders) in most operating systems like Windows and Linux. It stands for "remove directory." However, if the folder contains files, you need to use other commands or options to first delete the files inside it. In Windows, rd is also commonly used to remove directories. The del command is used for deleting files, and rm is used primarily in Linux and Unix-based systems for deleting both files and directories (with the appropriate flags).

    Rate this question:

  • 5. 

    What does the echo command do?

    • A.

      Display message on screen

    • B.

      Display the contents of a text file

    • C.

      Copy a file to another location

    • D.

      Display output one screen at a time

    Correct Answer
    A. Display message on screen
    Explanation
    type will display the contents of a text file. copy will copy a file to another location. more will display output one screen at a time

    Rate this question:

  • 6. 

    Which command do you use to change file permissions?

    • A.

      Perms

    • B.

      Cacls

    • C.

      Chmod

    • D.

      Dir

    Correct Answer
    B. Cacls
    Explanation
    chmod is the LInux command for changing file permissions. dir will display directory contents. perms will show permissions for a user

    Rate this question:

  • 7. 

    Which command do you use to schedule a task?

    • A.

      Crontab

    • B.

      Exec

    • C.

      Watch

    • D.

      At

    Correct Answer
    D. At
    Explanation
    The command used to schedule a task in Unix-like operating systems is at. The at command allows you to schedule a one-time execution of a command or script at a specified time in the future.

    Rate this question:

  • 8. 

    Which command do you use to clear the prompt screen?

    • A.

      Cd

    • B.

      Cls

    • C.

      Clean

    • D.

      Clear

    Correct Answer
    B. Cls
    Explanation
    cd will change the directory. clear is the Linux command for clearing the screen. clean is not a valid command

    Rate this question:

  • 9. 

    Which registry stores file associations?

    • A.

      HKEY_LOCAL_MACHINE

    • B.

      HKEY_CURRENT_CONFIG

    • C.

      HKEY_CURRENT_USER

    • D.

      HKEY_CLASSES_ROOT

    Correct Answer
    D. HKEY_CLASSES_ROOT
    Explanation
    HKEY_CURRENT_CONFIG contains information gathered at runtime. HKEY_CURRENT_USER stores settings that are specific to the currently logged-in user. HKEY_LOCAL_MACHINE stores settings that are specific to the local computer

    Rate this question:

  • 10. 

    Which of the following are valid file attributes?

    • A.

      Read, write, execute

    • B.

      Full control, read & execute, modify, special permissions

    • C.

      Hidden, read only, system, archive

    • D.

      Owner, group, other

    Correct Answer
    C. Hidden, read only, system, archive
    Explanation
    Read, write, execute are LInux permissions. Full control, read & execute, modify, special permissions are Windows permissions. Owner, group, other are Linux file owner types

    Rate this question:

  • 11. 

    Which of the following commands will shutdown a computer with no time-out or warning?

    • A.

      Shutdown /p

    • B.

      Psshutdown

    • C.

      Shutdown /r

    • D.

      Poweroff

    Correct Answer
    A. Shutdown /p
    Explanation
    shudown /r and psshutdown will shutdown and restart. poweroff is not a CMD command

    Rate this question:

  • 12. 

    What does the hostname command do?

    • A.

      Output the current username

    • B.

      Display version information

    • C.

      Display the name of the computer

    • D.

      Switch user

    Correct Answer
    C. Display the name of the computer
    Explanation
    The hostname command is used to display the name of the computer. It provides the user with the information about the specific name assigned to the computer system. This can be useful when identifying and connecting to a particular computer on a network or when troubleshooting network-related issues.

    Rate this question:

  • 13. 

    Which of the following will display all hidden files in a folder?

    • A.

      Dir -ah

    • B.

      Ls -h

    • C.

      Dir /a:a

    • D.

      Dir /a:h

    Correct Answer
    D. Dir /a:h
    Explanation
    dir /a:a will display all archive files in a folder. ls -h will print sizes in human readable format. dir -ah is not a valid command

    Rate this question:

  • 14. 

    Which of the following commands would be used to set a file to read-only? 

    • A.

      Chmod 444

    • B.

      Attrib +r

    • C.

      Cacls /r

    • D.

      Attrib -r

    Correct Answer
    B. Attrib +r
    Explanation
    attrib -r will remove read-only attribute. cacls /r will revoke specified user's access rights. chmod 444 is the linux command for setting read permissions for all users.

    Rate this question:

  • 15. 

    What does the fc command do?

    • A.

      Compare two files

    • B.

      Copy file

    • C.

      Check file

    • D.

      Change format

    Correct Answer
    A. Compare two files
    Explanation
    The fc command is used to compare two files. It allows users to identify the differences between the contents of two files and displays them side by side. This can be useful for verifying if any changes have been made to a file or for troubleshooting purposes.

    Rate this question:

  • 16. 

    What does the CMD command do?

    • A.

      Clear the screen

    • B.

      Start a new command shell

    • C.

      Run a command

    • D.

      Close the command shell

    Correct Answer
    B. Start a new command shell
    Explanation
    The CMD command in Windows is used to start a new command shell. It opens a new instance of the command prompt, allowing users to execute various commands and perform tasks within the command-line interface. This command is commonly used to access and navigate through the file system, run programs, and perform administrative tasks on the computer.

    Rate this question:

  • 17. 

    Which of the following changes folder permissions?

    • A.

      Cacls

    • B.

      Attrib

    • C.

      Chmod

    • D.

      Icacls

    Correct Answer
    D. Icacls
    Explanation
    cacls is for changing file permissions. attrib changes file attributes. chmod is the linux command for changing file permissions

    Rate this question:

  • 18. 

    Which command will change account passwords?

    • A.

      Pspasswd

    • B.

      Net user

    • C.

      Passwd

    • D.

      Chgrp

    Correct Answer
    C. Passwd
    Explanation
    In Unix-like operating systems, passwd is used to change user passwords. Here’s a brief overview of the commands:
    pspasswd: This is not a standard command for changing passwords.
    net user: This command is used in Windows to manage user accounts, including changing passwords, but it is not specifically used for changing passwords.
    passwd: This is used to change a user’s password in Unix-like systems.
    chgrp: This command changes the group ownership of files and directories, not passwords.

    Rate this question:

  • 19. 

    Which of the following commands will display the current date and time?

    • A.

      Date

    • B.

      Logtime

    • C.

      Date /t

    • D.

      Echo

    Correct Answer
    C. Date /t
    Explanation
    echo will display a message. logtime will log the date and time in a file. date will set the system date

    Rate this question:

  • 20. 

    Which command will search for a text string in a file?

    • A.

      Find

    • B.

      Grep

    • C.

      Findstr

    • D.

      Awk

    Correct Answer
    C. Findstr
    Explanation
    find is for searching for a file. grep is the linux command for searching for a text string in a file. awk is the linux command for Ffinding and replacing text in a file

    Rate this question:

  • 21. 

    Which of the following is NOT a file system?

    • A.

      NTFS

    • B.

      UDF

    • C.

      FAT

    • D.

      FTP

    Correct Answer
    D. FTP
    Explanation
    NTFS is New Technology File System, a file system that replaced FAT (FIle Allocation Table). UDF is Universal Disk Format used for optical media. FTP is File Transport Protocol.

    Rate this question:

  • 22. 

    Which command will list system information?

    • A.

      Ver

    • B.

      Whoami

    • C.

      Psinfo 

    • D.

      Systeminfo

    Correct Answer
    D. Systeminfo
    Explanation
    The systeminfo command displays detailed system information in Windows, including the operating system version, system architecture, memory, network adapter details, and other hardware and software configurations. This command is useful for diagnosing system issues or checking system specifications.

    Rate this question:

  • 23. 

    Which of the following will execute a program under another user account?

    • A.

      Runas

    • B.

      Su

    • C.

      Sudo

    • D.

      Psexec

    Correct Answer
    A. Runas
    Explanation
    su will switch user. Sudo is the linux command for executing a program as another user. psexec will execute process remotely.

    Rate this question:

  • 24. 

    Which command is used to import registry settings?

    • A.

      Regini

    • B.

      Reg

    • C.

      Regedit

    • D.

      Regsvr32

    Correct Answer
    C. Regedit
    Explanation
    regini will change registry permissions. regsvr32 will register or unregister a DLL. reg will read, set, export, delete keys and values.

    Rate this question:

  • 25. 

    Which command will delay execution for 5 seconds?

    • A.

      Waitfor 5

    • B.

      At 5

    • C.

      Start 5

    • D.

      Sleep 5

    Correct Answer
    D. Sleep 5
    Explanation
    waitfor is used to synchronize events between one or more networked computers. at is used to schedule a command at specific time. start is used to start a program

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Sep 08, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 13, 2014
    Quiz Created by
    PremierGaou
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.