Howtodojo logo
  • Home 
  • About 
  • Certifications 
  • Sample Database 
  • Cheatsheet 
  • Glossary 
  • Blog 
  • Tags 
  1.   Linux Commands
  1. Home
  2. Guides
  3. Linux Commands
  4. Linux logname Command

Linux logname Command

Share via
Howtodojo
Link copied to clipboard

In this tutorial we learn how to use logname command in Linux. The logname command print current user login name.

On this page
What is Linux logname Command?   logname Syntax   Using logname command in Linux   logname Command Manual / Help   Linux logname Command Source Code   Related Linux Commands   Summary  

What is Linux logname Command?  

In this tutorial, we learn how to use the logname command in Linux. This command in print user´s login name

logname Syntax  

logname [OPTION]

Using logname command in Linux  

To use logname command in Linux we just have to run this command, no options or parameter to be passed to this command.

$ logname
vagrant

The output above shows that my current username is vagrant.

logname Command Manual / Help  

We can use man and info command to see the manual page of logname command.

logname command also have --help option to show list of options.

To open man page for logname command we can use command below. To exit man or info page you can press q.

man logname

To open info page for logname command we can use command below.

info logname

To open help page from logname command we can run command below.

logname --help

Linux logname Command Source Code  

You can find logname command source code from the following repositories:

  • 1. logname source code on GitHub
  • 2. logname source code on GNU Savannah cgit
  • 3. logname source code on GNU Savannah gitweb

Related Linux Commands  

You can read tutorials of related Linux commands below:

  • whoami command in Linux
  • id command in Linux
  • groups command in Linux

Summary  

In this tutorial, we learn how to use the logname command in Linux with practical examples. Visit our Linux Commands guide to learn more about using command-line interface in Linux.

 Linux true Command
Linux link command 
On this page:
What is Linux logname Command?   logname Syntax   Using logname command in Linux   logname Command Manual / Help   Linux logname Command Source Code   Related Linux Commands   Summary  
Follow me

We publish tutorials, tips and tricks about Linux, open source, cloud computing, and infrastructure

     
Copyright © 2012 - 2025 howtodojo.com. |
Howtodojo
Code copied to clipboard