Command "hostname" still sets host name when second argument is given

Solution Verified - Updated -

Issue

  • Command "hostname" still sets host name when second argument is given
# which hostname
/bin/hostname

# hostname
server.example.com

# hostname cat /etc/hosts.allow

# hostname
cat

Environment

  • Red Hat Enterprise Linux 6
  • /bin/hostname

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.