how can I get username of network user lic?

3 次查看(过去 30 天)
I installed matlab on linux. And I have a network user lic. On lic server's mlm.opt file, I need to specify the username of client.
My question is how can I get the user name?
I know on windows, the user name can be get by type 'set' in cmd.
What can I do on linux?

采纳的回答

Chunru
Chunru 2021-12-15
编辑:Chunru 2021-12-15
You can try:
$ printenv
or
$ echo $USERNAME

更多回答(1 个)

Walter Roberson
Walter Roberson 2021-12-15
On Mac and Linux:
getenv("USER")
ans = 'mluser'
!whoami
mluser

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by