macOS 编程获取当前桌面的登录用户名

一、shell 命令

  id -un

二、C 语言

  getlogin() 函数

猜你喜欢

转载自www.cnblogs.com/pinweyshg/p/9782192.html
今日推荐