Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

What is the recommended way to change the hostname?

Featured Replies

Solved by mitu

Found the actual codes executed in /usr/lib/armbian-config/jobs.sh, when you run

sudo armbian-config

Basically, it updates /etc/hostname, /etc/hosts

Here is my wrapped function:

change_hostname() {
    # modified from /usr/lib/armbian-config/jobs.sh
    # should be OK for debian as well(?)
    local hostname_current=$(cat /etc/hostname)

    if [[ -z $1 ]]; then
        echo "Current hostname: $hostname_current"
    else
        local hostname_new=$1
        sudo sed -i "s/$hostname_current/$hostname_new/g" /etc/hosts
        sudo sed -i "s/$hostname_current/$hostname_new/g" /etc/hostname
        # Temporarily change the hostname for the current session
        sudo hostname "$hostname_new"
        sudo systemctl restart systemd-logind.service
        echo "Logout to make effective the new hostname: $hostname_new"
    fi
}

 

13 hours ago, arman said:
 sudo systemctl restart systemd-logind.service

 

Will log you out automatically, at least when running desktop.

 

In case one is running Google Chrome, this will lock it out ;) This 10 years bug is still valid:
https://askubuntu.com/questions/476918/google-chrome-wont-start-after-changing-hostname

 

BTW. We are switching to armbian-config new generation soon and here this is done this way:

https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.system.sh#L33-L38

If you have ideas for improvements, welcome.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.