how can I get username of network user lic?

5 ビュー (過去 30 日間)
dayu lai
dayu lai 2021 年 12 月 15 日
回答済み: Walter Roberson 2021 年 12 月 15 日
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 Center および File ExchangeInstall Products についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by