shell Linux hostname

# 3 different ways:
hostname
cat /etc/hostname
hostnamectl

# example output
root@MCSJT7GM44:~# hostnamectl
 Static hostname: MCSJT7GM44
	   Icon name: computer-container
		 Chassis: container ?
	  Machine ID: f257eb4143c04c518ce5a0da1e27e489
		 Boot ID: b4e917a64db649c2a0ac4d73b6119c08
  Virtualization: wsl
Operating System: Ubuntu 24.04.1 LTS
		  Kernel: Linux 6.6.87.2-microsoft-standard-WSL2
	Architecture: x86-64
Identify the Hostname of a Linux box.

Updated: Thursday 9th October 2025, 22:10am

There are 0 comments

Leave a comment of your own

Comments are currently closed.