Linux logname Command

What is Linux logname Command?

In this tutorial we learn how to use logname command in Linux. logname command in Linux 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 folowing repositories:

You can read tutorials of related Linux commands below:

Summary

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

1 thought on “Linux logname Command”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.