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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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. watch command examples to run a command repeatedly or monitor dynamically changeable files (like /proc/*)
  2. numlockx: command not found
  3. bfg Command Examples (Remove large files or passwords from Git history like git-filter-branch)
  4. How to Disable user list on GNOME login screen in CentOS/RHEL 8
  5. How to monitor NVME drives on Centos 6
  6. binwalk: command not found
  7. How to find docker storage device and its size (device mapper storage driver)
  8. How to change the PATH variable in Linux
  9. dget: command not found
  10. CentOS/RHEL – vgs command reports error: “global/global_filter” unknown

You May Also Like

Primary Sidebar

Recent Posts

  • gml2gv Command Examples
  • glow Command Examples
  • glib-compile-resources Command Examples
  • glances Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright