Changing ubuntu hostname has no effectemacs error: “Symbol's value as variable is void: hostname”Why...

Does it makes sense to buy a new cycle to learn riding?

Can I legally use front facing blue light in the UK?

New order #4: World

Is Social Media Science Fiction?

How would photo IDs work for shapeshifters?

What happens when a metallic dragon and a chromatic dragon mate?

Ideas for 3rd eye abilities

How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)

Is "plugging out" electronic devices an American expression?

extract characters between two commas?

Does the average primeness of natural numbers tend to zero?

Extreme, but not acceptable situation and I can't start the work tomorrow morning

Email Account under attack (really) - anything I can do?

Why is the design of haulage companies so “special”?

Is ipsum/ipsa/ipse a third person pronoun, or can it serve other functions?

Denied boarding due to overcrowding, Sparpreis ticket. What are my rights?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Could a US political party gain complete control over the government by removing checks & balances?

Why airport relocation isn't done gradually?

Why doesn't a const reference extend the life of a temporary object passed via a function?

How could a lack of term limits lead to a "dictatorship?"

Symmetry in quantum mechanics

Is there a name of the flying bionic bird?

Why is my log file so massive? 22gb. I am running log backups



Changing ubuntu hostname has no effect


emacs error: “Symbol's value as variable is void: hostname”Why Windows XP installs IPv6 but doesn't support it?Ubuntu hostname problemWhy does editing my hosts file to block websites show them as LISTENING?Set up CentOS6 Web Server on local network, but unable to view websites on it?linux apache localhost now not accessible in LANConfiguring /etc/hosts to run an applicationVMWare access client through hostnamevnc cannot connect to host after changing server hostname, server is ubuntu14.04.4Persisting IP after change when hostname called (Windows)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I am new to ubuntu and I am trying to change hostname of my ubuntu server 18.04.2 LTS. I've already changed /etc/hostname and /etc/hosts and rebooted. But it didn't work.



My files:
/etc/hostname:




ubuntu-s2




/etc/hosts:




127.0.0.1 localhost.localdomain ubuntu-s2



::1 localhost6.localdomain6 localhost6



::1 localhost ip6-localhost ip6-loopback



fe00::0 ip6-localnet



ff02::1 ip6-allnodes



ff02::2 ip6-allrouters
ff02::3 ip6-allhosts




Is the only way to do it to change preserve hostname to true in /etc/cloud/cloud.cfg?










share|improve this question









New contributor




j_skowron is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    0















    I am new to ubuntu and I am trying to change hostname of my ubuntu server 18.04.2 LTS. I've already changed /etc/hostname and /etc/hosts and rebooted. But it didn't work.



    My files:
    /etc/hostname:




    ubuntu-s2




    /etc/hosts:




    127.0.0.1 localhost.localdomain ubuntu-s2



    ::1 localhost6.localdomain6 localhost6



    ::1 localhost ip6-localhost ip6-loopback



    fe00::0 ip6-localnet



    ff02::1 ip6-allnodes



    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts




    Is the only way to do it to change preserve hostname to true in /etc/cloud/cloud.cfg?










    share|improve this question









    New contributor




    j_skowron is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I am new to ubuntu and I am trying to change hostname of my ubuntu server 18.04.2 LTS. I've already changed /etc/hostname and /etc/hosts and rebooted. But it didn't work.



      My files:
      /etc/hostname:




      ubuntu-s2




      /etc/hosts:




      127.0.0.1 localhost.localdomain ubuntu-s2



      ::1 localhost6.localdomain6 localhost6



      ::1 localhost ip6-localhost ip6-loopback



      fe00::0 ip6-localnet



      ff02::1 ip6-allnodes



      ff02::2 ip6-allrouters
      ff02::3 ip6-allhosts




      Is the only way to do it to change preserve hostname to true in /etc/cloud/cloud.cfg?










      share|improve this question









      New contributor




      j_skowron is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I am new to ubuntu and I am trying to change hostname of my ubuntu server 18.04.2 LTS. I've already changed /etc/hostname and /etc/hosts and rebooted. But it didn't work.



      My files:
      /etc/hostname:




      ubuntu-s2




      /etc/hosts:




      127.0.0.1 localhost.localdomain ubuntu-s2



      ::1 localhost6.localdomain6 localhost6



      ::1 localhost ip6-localhost ip6-loopback



      fe00::0 ip6-localnet



      ff02::1 ip6-allnodes



      ff02::2 ip6-allrouters
      ff02::3 ip6-allhosts




      Is the only way to do it to change preserve hostname to true in /etc/cloud/cloud.cfg?







      linux networking ubuntu hostname






      share|improve this question









      New contributor




      j_skowron is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      j_skowron is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 2 days ago







      j_skowron













      New contributor




      j_skowron is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 days ago









      j_skowronj_skowron

      11




      11




      New contributor




      j_skowron is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      j_skowron is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      j_skowron is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You are missing one thing:



          hostnamectl set-hostname ubuntu-s2


          After that, reboot. Your hostname will then be ubuntu-s2






          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            j_skowron is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1422209%2fchanging-ubuntu-hostname-has-no-effect%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You are missing one thing:



            hostnamectl set-hostname ubuntu-s2


            After that, reboot. Your hostname will then be ubuntu-s2






            share|improve this answer




























              0














              You are missing one thing:



              hostnamectl set-hostname ubuntu-s2


              After that, reboot. Your hostname will then be ubuntu-s2






              share|improve this answer


























                0












                0








                0







                You are missing one thing:



                hostnamectl set-hostname ubuntu-s2


                After that, reboot. Your hostname will then be ubuntu-s2






                share|improve this answer













                You are missing one thing:



                hostnamectl set-hostname ubuntu-s2


                After that, reboot. Your hostname will then be ubuntu-s2







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 2 days ago









                Nasir RileyNasir Riley

                636136




                636136






















                    j_skowron is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    j_skowron is a new contributor. Be nice, and check out our Code of Conduct.













                    j_skowron is a new contributor. Be nice, and check out our Code of Conduct.












                    j_skowron is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1422209%2fchanging-ubuntu-hostname-has-no-effect%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                    Tribunal Administrativo e Fiscal de Mirandela Referências Menu de...

                    looking for continuous Screen Capture for retroactivly reproducing errors, timeback machineRolling desktop...