Linux Crash Course - Setting the Hostname of your Linux Workstation or Server
HTML-код
- Опубликовано: 2 окт 2024
- 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!
➡️ ubuntuserverbo...
🙌 Support me on Patreon and get early access to new content!
➡️ learnlinux.lin...
☁️ Get $100 toward your own cloud server with Linode!
➡️ linode.com/lear...
🛒 Affiliate store for Linux compatible hardware/accessories (commission earned):
➡️ learnlinux.lin...
💻 Check out the Tiny Pilot KVM for your Homelab (commission earned):
➡️ learnlinux.lin...
🐦 Follow me on Twitter!
➡️ learnlinux.lin...
💬 Official LearnLinux.tv Community:
➡️ community.lear...
💽 How to create a bootable flash drive for installing Linux
➡️ linux.video/fl...
🐧 Which distro do I use?
➡️ learnlinux.lin...
🔐 How to better secure OpenSSH:
➡️ linux.video/se...
☁️ How to create a cloud Linux server with Linode:
➡️ learnlinux.lin...
👨 More about me:
➡️ www.jaylacroix...
➡️ www.learnlinux...
#LearnLinuxTV #Linux #Networking
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
WOW, again I needed a quick answer and you have the video.
Really nice, my kid was able to do by following your instruction. - Thank you
YOOOO!!! Are you the guy who does the A+, Net+ tutorial voice overs? Jeez if so, you’re a legend.
That's awesome video Jay. You are the coolest Linux teacher in the Universe. Respect from Poland.
Thanks!
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
Thanks for your well explained videos. Please make it about sed and awk :)
you like being punished don't you lol it would be a good vid though.
But why should we also edit /etc/hosts
why is it a best practice?
Actually a pretty neat and thought out intro.
okay, but why does it automatically changes to my IPS's name after every damn boot, it also breaks applications... I know it has to do with Network Manager, still I dont understand why a system breaking option is default.
I got an error on my WSL2 Ubuntu:
`System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to create bus connection: Host is down`
well i got error still , Siege test sw in ubuntu
says : [error] socket: unable to connect sock.c:282: No route to host
can anyone help ! ☺♥♥♥
is this the same host route or what s meaning of this errorin admin panel . ggl results end up in unknow
test
sudo siege -c20 -t10s "any-domain"
Hi. Love this short videos. I question i've got is, how can you change the order. For example, [serverName@userName] instead of [userName@serverName]. Thanks.
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
Thank you so much i had problems with it. Once more thank you so much
Very clear explanation ! thanks
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)?
exec is built-in function in bash and what it does is replace the current shell with command put in the second argument
Thanks, it taught me what I needed to know right a way!
Why go through all this? I didn't even know the hostnamectl command before. I just edit the /etc/hostname file.
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.
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?
Great tutorial thanks
OMG! Just solved a internal DNS problem :) TNX Jay.
It just occurred to me, there needs to be a DOG command that chases CAT.
ty
how would you go about it in an unattended BASH script?
Wow... Thank you... Feeling great now that l can change hostname.
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.
nice. quick question: just installed Ubuntu desktop, do I need antivirus for it?
U don’t need too...
Editing /etc/hostname along with /etc/resolv.conf has worked great for me in the past to set my domain name on Debian, Pop, and Arch machines, but i just started using Fedora, and for some reason `hostname --fqdn` only gives my hostname (not domain name), and `dnsdomainname` prints a blank line. Using `resolvectl` allowed me to set dns and domain manually, but I've never had to do that before. It's as if /etc/resolv.conf was ignored. Any idea why?
Fedora deals with this differently as far as i know
Thank you, Jay. Byte sized then?
@3:50
"So if I open a new tab, for example"
Which terminal emulator are you using that offers multiple tabs per window?
Various distros that I am sampling, via VirtualBox, do not have that feature. They seem to be bundled with basic terminal apps that do little more than let you choose the font and window transparency.
I use Terminator which can be split into multiple terminal windows. The default terminal emulator in Linux Mint supports multilple tabs.
Try shift+ctrl+t
@@pavlospilakoutas That worked. Thank you.
All of your video are super clear and helpful. Thank you!
Palestine is free
Any LFCS course
Your channel is perfect. Clear, concise and well presented. Thanks.
Cool, thank you
First of all thank you very much for the videos. Can you make a video showing how to migrate from Apache2 to Nginx? Much appreciated.
Your instructions worked! and I have stand corrected. Outstanding presentation.