• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

logname Command Examples in Linux

by admin

logname command prints the user’s login name. For example:

$ logname
geek

logname Comman Options

Option Description
–help display this help and exit
–version output version information and exit

1. To print the users login name:

# logname

2. To get the help for logname command:

# logname --help 

3. To output version information:

# logname --version 

Filed Under: Linux

Some more articles you might also be interested in …

  1. ctr: command not found
  2. apache2ctl: command not found
  3. UNIX / Linux : What Is a Shell? What are different Shells?
  4. How to change a system’s machine-ID in Oracle Enterprise Linux 7
  5. Beginners Guide to Samba (Installation and Configuration)
  6. How to Install gnome-session-wayland software package in Ubuntu
  7. lsscsi Command Examples in Linux
  8. lastlog: command not found
  9. ncview: command not found
  10. vdir: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • ncat Command Examples in Linux
  • ncat: command not found
  • nautilus Command Examples in Linux
  • namei: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright