A desktop technician needs to update the local host name resolution file (`hosts`) on a Windows workstation to redirect a legacy internal domain. The existing `hosts` file in `C:\Windows\System32\drivers\etc` is marked as read-only and hidden. Order the steps from first to last that the technician should perform to complete this modification securely.
- 1Open Command Prompt as an Administrator.
- 2Execute `attrib -r -h hosts` within the `C:\Windows\System32\drivers\etc` directory.
- 3Edit and save the updated entry inside the `hosts` file.
- 4Execute `attrib +r +h hosts` in the same directory.
Answer
The technician must first open Command Prompt with administrative privileges, execute `attrib -r -h hosts` to clear the file attributes, save the edits to the `hosts` file, and finally run `attrib +r +h hosts` to re-secure the file.
To modify system files located in system directories, administrator privileges must be used first. System files like the local `hosts` file frequently have read-only (`r`) and hidden (`h`) attributes set. Using `attrib -r -h` removes these flags so edits can be saved. After editing, re-applying the flags with `attrib +r +h` maintains workstation security and system integrity.
Step-by-Step Solution
Key Concept
Managing file attributes using the Windows `attrib` command-line tool
Estimated Time:1m 30s