Category Archives: Howto Tutorials (EN)

Knowledge Network for Tutorials, Howto’s, Workaround, DevOps Code for Professionals.

Change Computer Name or Hostname

Rename a Computer Name or the Hostname

Hostname is the unique name of a computer under which the systems can be recognized and identify each other in the network.

The Hostname is usually queried in the installation dialog and set during installation. This post shows how to change the Hostname on Linux and the Computer Name on Windows and macOS.

How to Rename Windows Computer Name

For Windows, the Computer Name can be assigned in the System Properties MMC-Console.

Windows Logo + R

Hit keyboard shortcut Win+R and type SYSTEMPROPERTIESCOMPUTERNAME
to open the MMC-Console.

Run SYSTEMPROPERTIESCOMPUTERNAME
Windows System Properties - Change Computer Name

Click on the Change button to rename the computer. After the change done, Windows must be restarted.

If you want to go through the Windows 10 settings, go to Start – Settings – System – About – Rename this PC.

In the Windows Command prompt there is the command hostname and ipconfig to output the computer name.

hostname
ipconfig /all | findstr hostname

This option is particularly suitable for batch processing. The query with output in the command prompt (cmd) shows below.

Command prompt to rename hostname
Illustration: command prompt run hostname, ipcconfig /all | findstr Hostname

View Windows Computer Name in PowerShell

$env:computername

The Windows Computer Name can also be renamed in PowerShell. To do this with open PowerShell as an administrator.

Rename-Computer -NewName NewComputerName

If the Computer is in a Windows domain, the following command can be used to rename it.

Rename-Computer -NewName NewComputerName -DomainCredential domain\Administrator -PassThru

Instead of NewComputerName, enter the actual computer name, with DomainCredential you authenticate as a domain administrator.

Change Linux hostname

Linux hostname can be queried by run hostname command.

$ hostname
$ zeus.simple.foo

Output Linux system status with hostnamectl status.

$ hostnamectl status
   Static hostname: zeus.simple.foo
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 94c14d79bb182e1aa3f0171a0eb05e79
           Boat ID: c28ea53f380c4e0eabe696f08128585c
    Virtualization: vmware
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-13-amd64
      Architecture: x86-64

In the terminal run hostnamectl set-hostname to change it.

hostnamectl set-hostname NewHostname.domain.foo

With earlier versions like CentOS 5 or Debian 7 the query as well as the change takes place with the command hostname.

hostname NewHostname.domain.foo

To make hostname persistent save it in to the file /etc/hostname.

Edit macOS Computer Name

View and change the computer name on macOS. To do this, go via the Apple logo – System Preferences – Shares.

View and change your computer name on macOS

For Computer Name, this is set by clicking on Edit.

Alternatively, there is also the possibility to change the computer name in the macOS terminal.

sudo scutil --set HostName "NewHostname.domain.foo"

To check the change, the Mac Terminal must be closed, when reopened the new hostname appears in the prompt.

Launch AnyDesk Remote Desktop from KeePass

How to Launch AnyDesk Remote Desktop Access from KeePass

KeePass is a useful tool for administrators in their daily work in system maintenace and administrative tasks. AnyDesk is also often used, other remote maintenance software, such as VNC Viewer for remote desktop remote maintenance, also SSH terminal sessions to server and network devices are required.

This post shows how to launch AnyDesk Remote Desktop session to a remote computer directly from KeePass.

Add a new entry in KeePass

KeePass enables an external program to be executed out from an item with the transfer of parameters such as host name or address and the user credentials for authentication. To do this, add a new entry in KeePass with choose Add Entry to creates a new target.

Launch AnyDesk Remote Desktop Access from KeePass

In the General tab, the computer name is entered in the Title field. For User name the AnyDesk alias which is usually the computer name (hostname), alternatively the AnyDesk ID can be used. The AnyDesk password is entered in the Password field.

The KeePass URL to pass the parameters to AnyDesk:

cmd://"C:Program Files (x86)AnyDeskAnyDesk.exe" {USERNAME} --with-passwor

Launch AnyDesk Remote Desktop

After the entry is saved, the AnyDesk Remote Desktop session is started with a double-click in the URL column, or with the key combination Ctrl+V

Double click URL to connect AnyDesk Remote Desktop
AnyDesk Alias is the hostname

AnyDesk Alias is the hostname, or the ID that is displayed with 9 digits on the remote computer. The hostname (alias) is transferred to AnyDesk with the User name field as the USERNAME variable with the password as a parameter from KeePass.

What is AnyDesk Remote Desktop

AnyDesk is a remote desktop application distributed by AnyDesk Software GmbH. The proprietary software program provides platform independent remote access to personal computers and other devices running the host application. It offers remote control, file transfer, and VPN functionality. AnyDesk is often used in technical support and other remote access.

What is KeePass Password Safe

KeePass Password Safe is a free and open-source password manager primarily for Windows. It officially supports macOS and Linux operating systems through the use of Mono. Additionally, there are several unofficial ports for Windows Phone, Android, iOS, and BlackBerry devices, which normally work with the same copied or shared (remote) password database. KeePass stores usernames, passwords, and other fields, including free-form notes and file attachments, in an encrypted file.