• 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. atop Command Examples in Linux
  2. ports Command Examples in Linux
  3. treetime: command not found
  4. Supported and Recommended File Systems on Linux
  5. Nohup Command Examples – Runs a Command that Keeps Running after You Log Out
  6. CentOS / RHEL : How to move a Volume Group from one system to another
  7. User Unable To Edit crontab, Error: “/tmp/crontab.Lm34gsJV: Permission denied”
  8. CentOS / RHEL 7 : How to boot into Rescue Mode or Emergency Mode
  9. How to change the default IP address of docker bridge
  10. “az account” Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • ctags: Generates an index (or tag) file of language objects found in source files for many popular programming languages
  • csvtool: Utility to filter and extract data from CSV formatted sources
  • csvstat: Print descriptive statistics for all columns in a CSV file
  • csvsql: Generate SQL statements for a CSV file or execute those statements directly on a database

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright