You are not logged in.

#1 2021-08-02 17:09:27

kazi_sifat9
Banned
Registered: 2021-07-18
Posts: 28

I cant find some file and i think i mess my arch installation

vim /etc/hostname #why this file is empty there should something....


I did a mistake on arch installation i wrote
_____________________________________________
127.0.0.1 localhost
::1
127.0.1.1 hostname .localdomain_hostname
_____________________________________________

This should on /etc/hosts but mistakenly I wrote on. /etc/host  see "s" is missing but everything working perfectly fine

Offline

#2 2021-08-02 17:34:37

lmn
Member
Registered: 2021-05-09
Posts: 93
Website

Re: I cant find some file and i think i mess my arch installation

Is there an actual question beeing asked? Which file is missing?

For setting your hostname see the the wiki.

For the second part you can just delete/move the wrongly named file. I recommend checking the man pages first.

Also please consider using code tags.

Offline

#3 2021-08-02 20:50:59

captain_sensible
Member
Registered: 2021-05-29
Posts: 46

Re: I cant find some file and i think i mess my arch installation

i guess if you using say a web browser for the internet everything will be ok . You might  notice errors if you decide to do web development  and want to see your "internally" hosted landing pages.In that case you will use in the browser address bar, url like localhost or maybe something like 127.0.0.5. 

Anyway i think you cam make good your errors . First decide what you want , the name of your computer to be in my case its "darkstar".
To set your hostname you can from a terminal shell type:


sudo echo theHostNameYouWant  > /etc/hostname 

then if /etc/hosts doesn't exist from the terminal you can change directory to /etc/

eg

cd /etc/

touch hosts 
sudo nano hosts 

nano quite frankly is easier than vim so if you don't have it install it .

here is an example of my /etc/hosts


# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1  localhost
::1        localhost
127.0.1.1 darkstar.localdomain darkstar
127.0.0.3  domainname1.com
127.0.0.2  andrinaPerfectBeauty.com
127.0.0.4 appstarter.com
127.0.0.5 andrinaDesignStudio.com

the 5th line  :


127.0.1.1 darkstar.localdomain darkstar

that defines my host name , in my case "darkstar". the lines starting #static .. to this line should be enough for you

the others i define along with virtual  host in httpd, so that from a browser i can for example just using 127.0.0.3 bring up a landing page ,

Last edited by captain_sensible (2021-08-02 20:51:52)

Offline

#4 2021-08-03 04:29:33

kazi_sifat9
Banned
Registered: 2021-07-18
Posts: 28

Re: I cant find some file and i think i mess my arch installation

Thanks to everyone..
How people keep remember me.
I thought everyone will react like first time helping ?

~solved

Last edited by kazi_sifat9 (2021-08-04 07:21:00)

Offline

Board footer

Powered by FluxBB