Linux Crash Course - Setting the Hostname of your Linux Workstation or Server

preview_player
Показать описание
The "Linux Crash Course" series (formerly known as the "Linux Essentials" series) tackles important concepts around Linux, one video at a time. In this video, I show you how to set the hostname of your Linux server or workstation, with a full walkthrough of the commands required to do so. We will also take a look at editing the /etc/hosts file as well. This video is part of the Linux Crash Course series.

📖 Check out Jay's latest book, Mastering Ubuntu Server 4th Edition. Covers Ubuntu 22.04!

🙌 Support me on Patreon and get early access to new content!

☁️ Get $100 toward your own cloud server with Linode!

🛒 Affiliate store for Linux compatible hardware/accessories (commission earned):

💻 Check out the Tiny Pilot KVM for your Homelab (commission earned):

🐦 Follow me on Twitter!

💽 How to create a bootable flash drive for installing Linux

🐧 Which distro do I use?

🔐 How to better secure OpenSSH:

☁️ How to create a cloud Linux server with Linode:

👨 More about me:

#LearnLinuxTV #Linux #Networking
Рекомендации по теме
Комментарии
Автор

That's awesome video Jay. You are the coolest Linux teacher in the Universe. Respect from Poland.

michalroesler
Автор

2021 and im a new linux user, kinda went in it blind and this tutorial i stumbled upon when i thought all hope was lost on such a small topic helped a lot

dlist
Автор

Jay, how about a quick tutorial on how to assign a static ip address to a Linux server/desktop? Thanks for all you do for the Linux community. Happy Holidays to you and your family

richardravich
Автор

Really nice, my kid was able to do by following your instruction. - Thank you

ma-jtcz
Автор

Actually a pretty neat and thought out intro.

kayakarakaya
Автор

All of your video are super clear and helpful. Thank you!

ronshabi
Автор

WOW, again I needed a quick answer and you have the video.

wekiwa
Автор

OMG! Just solved a internal DNS problem :) TNX Jay.

TradersTradingEdge
Автор

I use a Bash script that uses the sed command to change the hostname in both /etc/hostname and /etc/hosts. It checks the new hostname against a set of rules to ensure it's vailid and also checks to be sure the changes were successully applied in both files.

RickRomig
Автор

Wow... Thank you... Feeling great now that l can change hostname.

confidencemakoni
Автор

Thank you so much i had problems with it. Once more thank you so much

krzysztofh
Автор

Your channel is perfect. Clear, concise and well presented. Thanks.

joenaz
Автор

Thanks for your well explained videos. Please make it about sed and awk :)

TheDograncho
Автор

how would you go about it in an unattended BASH script?

AmichaiRotman
Автор

i would like to know this hostname changes will work with vsftpd server?
i am able to connect FTP user with IP address . i am looking to change it to hostname based login

nandhakishore
Автор

I was on Win10 when I watched this and tried "hostnamectl" on Ubuntu 20.04 in WSL2, but it didn't work because WSL2 doesn't use systemd for its init I guess. So I'm guessing this doesn't work with other none systemd distros as well. So would the preferred method be a simple "sudo nano /etc/hostname"? Jay, great job on recent videos, this Linux Essentials is a great idea for a series of videos. Love the homelab stuff too. Recent videos have really fit with the channel name "LearnLinuxTV." You have definitely brought your channel up another level, and you were already doing great work in the past too. Thanks for the excellent content.

SteveDaley
Автор

Your instructions worked! and I have stand corrected. Outstanding presentation.

anthonyedwards
Автор

Thanks for your videos! The are always clear and userful.
One question. Why you execute the "exec bash" command after change the hostname?
Is a "shortcut" to force the terminal to be re executed with the new changes (in this case the hostname)?

filippomenis
Автор

What is the point of a command "hostnamectr" that does not do a complete job? So is the entire 127.x.x.x address space potential different hosts on that computer?

wisnoskij
Автор

But why should we also edit /etc/hosts

why is it a best practice?

AltianoGerung