Difficulty: Easy
Correct Answer: Hostname
Explanation:
Introduction / Context:Knowing a machine's local host name is useful for identification, scripting, and network diagnostics. Different tools expose different aspects of the networking stack; selecting the direct one prevents confusion.
Given Data / Assumptions:
Concept / Approach:The utility that directly prints the system's host name is commonly named "hostname". On Windows PowerShell and Command Prompt, "hostname" prints the NetBIOS/host name; on UNIX-like systems, the same command reports the configured host name per system settings.
Step-by-Step Solution:
1) Open a terminal or command prompt. 2) Run: hostname 3) Read the output line; it is the local host's name.Verification / Alternative check:On UNIX-like systems, you can also check files or commands such as /etc/hostname, scutil --get ComputerName (macOS), or uname -n. On Windows, echo %COMPUTERNAME% also shows the system name, but "hostname" is the direct utility across platforms.
Why Other Options Are Wrong:
Common Pitfalls:Confusing environment variables (e.g., COMPUTERNAME) with a cross-platform utility; relying on tools that show remote names rather than the local system's configured name.
Final Answer:Hostname
Discussion & Comments