Thanks to visit codestin.com
Credit goes to github.com

Skip to content

$USER environment variable is not set in terminal sessions #1799

Closed
@deansheather

Description

@deansheather

OS Information

Steps to Reproduce

  1. Create a linux workspace
  2. Open a terminal in the web terminal or the CLI
  3. echo $USER
  4. Notice that nothing is printed

Expected

The current user's username (e.g. coder) should be printed

Actual

Nothing is printed

Workaround

Users can use $(whoami) in scripts instead of $USER

@f0ssel

Metadata

Metadata

Assignees

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions