Returns the user name or id, as informed by the operating system.


Updated Sat, 13 Aug 2011 17:03:06 +0000

View License

The code is trivial but worth having as a separate function.

Works under Windows and Linux, presumably also under modern Mac.

Cite As

Felipe G. Nievinski (2023). getUserName (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Search Path in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes