docsrodrigo de avila's knowledge base
GitHubGitHub (opens in a new tab) (opens in a new tab)
  • bookmarks
    • consul
    • databases
      • postgresql
      • pub/sub
    • dev
      • general
      • golang
      • sql
    • docker
    • git
    • general
    • jamstack
    • kubernetes
    • linux
    • mac os
    • redis
    • sre
    • virtual machines
  • how-to
    • apache
    • css
    • docker
    • git
      • frequently used
      • essentials
      • statistics
    • gpg
    • linux
      • almalinux
      • bash
      • ubuntu
      • wsl
    • lvm
    • mysql
      • queries
    • mac os
    • network
    • nginx
    • postgresql
      • commands
      • queries
      • replication
      • tools
    • engineering practices
    • ssh
    • sql server
      • queries
  • bookmarks
    • consul
    • databases
      • postgresql
      • pub/sub
    • dev
      • general
      • golang
      • sql
    • docker
    • git
    • general
    • jamstack
    • kubernetes
    • linux
    • mac os
    • redis
    • sre
    • virtual machines
  • how-to
    • apache
    • css
    • docker
    • git
      • frequently used
      • essentials
      • statistics
    • gpg
    • linux
      • almalinux
        • create temporary file
        • change hostname
      • bash
      • ubuntu
      • wsl
    • lvm
    • mysql
      • queries
    • mac os
    • network
    • nginx
    • postgresql
      • commands
      • queries
      • replication
      • tools
    • engineering practices
    • ssh
    • sql server
      • queries

On This Page

  • create temporary file
  • change hostname
how-to
linux
almalinux

almalinux

create temporary file

$ mktemp
/tmp/tmp.UHHyLzjCB0

change hostname

# change hostname between restarts
sudo hostnamectl set-hostname [HOST]
# change the hostname, before the restart
sudo hostnamectl --transient set-hostname [HOST]
# change the hostname on hosts file
sudo vim /etc/hosts

(c) 2020 - 2023 | rdeavila. licensed under the mit license.