How to change linux host name and alias name

I would like to know how to change my Linux host name and also give it an alias name. For example, it will have a formal name "EBGP- @CPE00400501f9a6:", and also an alias such as "FileServer001". Is it possible?

I think I can use command =91hostname' to change the Linux host name at runtime, and many other ways to do so. I just don't know how to assign it an alias name. Any idea?

I also would like to enable file transfer between a windows host and a linux host, within the same corporate network. By default every corporate network has DNS server and DHCP server, so I think the windows host and the Linux host can find each other via either their host names, or their alias names. For special case, I also want a host outside of the corporate network to transfer files with another host inside of the corporate network, so I prefer the file transfer via HTTP, which is more likely to pass the firewalls with less trouble than other protocols. Is there any samples codes available for this solution? Is there any potential risk for this technical solution?

Thank you and Merry Christmas!

Reply to
Like2Learn
Loading thread data ...

The startup script in BSD systems effectively runs hostname `cat /etc/myname` This gives the machine *the* hostname specified in /etc/myname.

Note that you can tell the name resolver to recognize any of several different names for your machine by tweeks to DNS records, hosts(5), etc. (depending on how the resolver is configured) -- but *the* hostname is still "as above".

Of course, if other machines can't see these aliases (e.g., local to your hosts(5) file), then they are only effective locally (this may be desirable *or* undesirable).

Likewise, other services have other ways of getting names (e.g., your mailer, web server, etc.) for "this box" which would have to be considered

Neither of these are present "by default". E.g., you could set up a static network that worked perfectly just by distributing a hosts(5) file to each machine.

I find HTTP file transfers often silently crash (i.e., the connection is terminated but the file isn't completely transfered). When this happens in an FTP transfer, it seems I am more aware of the problem (rather than *assuming* a completed transfer == a SUCCESSFUL transfer).

But, this could be a consequence of the clients I use in each case.

Reply to
D Yuniskis

).

e quoted text -

Thank you very much for sharing!

Reply to
Like2Learn

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.