# \#system

**URL:** https://forum.elixirforum.com/tag/system/828.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [How Elixir powers our Real-Time Vehicle Occupancy System](https://forum.elixirforum.com/t/how-elixir-powers-our-real-time-vehicle-occupancy-system/75554)

<div class="topic-metadata">

**Author:** [@cbinv](https://forum.elixirforum.com/u/cbinv)\
**Replies:** 0\
**Last updated:** [June 2, 2026, 12:05pm UTC](https://forum.elixirforum.com/t/how-elixir-powers-our-real-time-vehicle-occupancy-system/75554 "2026-06-02T12:05:40Z")

</div>

A post about how Elixir became a fundamental building block at Invision AI. We use Elixir and Phoenix in our Vehicle Occupancy system, an embedded device that captures images of passing vehicles and counts the number o…

---

## [Use env variables with System.cmd or Ports?](https://forum.elixirforum.com/t/use-env-variables-with-system-cmd-or-ports/14924)

<div class="topic-metadata">

**Author:** [@beardedeagle](https://forum.elixirforum.com/u/beardedeagle)\
**Replies:** 21\
**Last updated:** [June 25, 2025, 1:33am UTC](https://forum.elixirforum.com/t/use-env-variables-with-system-cmd-or-ports/14924 "2025-06-25T01:33:18Z")

</div>

I’m trying to figure out how to be able to expand ENV variables in either Port or System.cmd. Porcelain seems to be capable of this, but I cannot do it with either Port or System.cmd: iex(5)\> System.cmd("/bin/echo", \["$…

---

## [System.cmd with temporary $HOME returns 126 Permission Error on macOS Sequoia](https://forum.elixirforum.com/t/system-cmd-with-temporary-home-returns-126-permission-error-on-macos-sequoia/69692)

<div class="topic-metadata">

**Author:** [@PJUllrich](https://forum.elixirforum.com/u/PJUllrich)\
**Replies:** 5\
**Last updated:** [February 28, 2025, 5:54pm UTC](https://forum.elixirforum.com/t/system-cmd-with-temporary-home-returns-126-permission-error-on-macos-sequoia/69692 "2025-02-28T17:54:58Z")

</div>

I’m running into a 126 permission error when executing a Java command through System.cmd/3, but only if I give a custom $HOME environment variable. This problem only started recently, I think after I upgraded to macOS Se…

---

## [Use open\_browser() in tests when using WSL](https://forum.elixirforum.com/t/use-open-browser-in-tests-when-using-wsl/62948)

<div class="topic-metadata">

**Author:** [@ricksonoliveira](https://forum.elixirforum.com/u/ricksonoliveira)\
**Replies:** 11\
**Last updated:** [October 4, 2024, 3:01pm UTC](https://forum.elixirforum.com/t/use-open-browser-in-tests-when-using-wsl/62948 "2024-10-04T15:01:02Z")

</div>

Has anyone by any chance using WSL tried to use open\_browser in your tests? I’ve heard one could do something like open\_browser(lv, &System.cmd("wslview", \[&1\])). But I have no idea how to make WSL or Elixir know how to…

---

## [How to create tests for System.cmd and Port when is compiling with mix](https://forum.elixirforum.com/t/how-to-create-tests-for-system-cmd-and-port-when-is-compiling-with-mix/64259)

<div class="topic-metadata">

**Author:** [@shahryarjb](https://forum.elixirforum.com/u/shahryarjb)\
**Replies:** 0\
**Last updated:** [June 17, 2024, 9:07am UTC](https://forum.elixirforum.com/t/how-to-create-tests-for-system-cmd-and-port-when-is-compiling-with-mix/64259 "2024-06-17T09:07:55Z")

</div>

Hello, I hope you are well. Two years ago I created a lib ( mishka\_installer ) that compiles a hex pkg lib in another path and move bin (builded) files to the build dir and start the apps with some considerations. Now …

---

## [How to get Screen size in elixir?](https://forum.elixirforum.com/t/how-to-get-screen-size-in-elixir/56581)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 6\
**Last updated:** [June 21, 2023, 2:28pm UTC](https://forum.elixirforum.com/t/how-to-get-screen-size-in-elixir/56581 "2023-06-21T14:28:58Z")

</div>

Background I am working on an Elixir desktop application, and I need it to adapt to the monitor/screen size of the user. Using Elixir Desktop (GitHub - elixir-desktop/desktop: Building Local-First apps for Windows, MacO…

---

## [System.system\_time vs System.os\_time](https://forum.elixirforum.com/t/system-system-time-vs-system-os-time/48529)

<div class="topic-metadata">

**Author:** [@adamu](https://forum.elixirforum.com/u/adamu)\
**Replies:** 13\
**Last updated:** [April 19, 2023, 8:16pm UTC](https://forum.elixirforum.com/t/system-system-time-vs-system-os-time/48529 "2023-04-19T20:16:47Z")

</div>

Does anybody know the practical implications of using System.os\_time/0 vs System.system\_time/0? I notice DateTime.utc\_now/0 uses os\_time/0. There is some mention of the differences in the docs for system\_time/0: It i…

---

## [Unexpected System.cmd PSQL Certificate Challenge](https://forum.elixirforum.com/t/unexpected-system-cmd-psql-certificate-challenge/49853)

<div class="topic-metadata">

**Author:** [@ragamuf](https://forum.elixirforum.com/u/ragamuf)\
**Replies:** 4\
**Last updated:** [September 2, 2022, 5:49am UTC](https://forum.elixirforum.com/t/unexpected-system-cmd-psql-certificate-challenge/49853 "2022-09-02T05:49:51Z")

</div>

I am running into a certificate challenge whenever I use System.cmd to shell out to psql on my prod server, which speaks to a remote server running the database. The database is set to enforce SSL. I can connect my Phoe…

---

## [How to send line by line of System.cmd to LiveView when a task is running](https://forum.elixirforum.com/t/how-to-send-line-by-line-of-system-cmd-to-liveview-when-a-task-is-running/48336)

<div class="topic-metadata">

**Author:** [@shahryarjb](https://forum.elixirforum.com/u/shahryarjb)\
**Replies:** 9\
**Last updated:** [June 14, 2022, 11:14am UTC](https://forum.elixirforum.com/t/how-to-send-line-by-line-of-system-cmd-to-liveview-when-a-task-is-running/48336 "2022-06-14T11:14:41Z")

</div>

Hi friend, I run 3 or 4 different command with System.cmd, so users wait for these tasks are done and after getting status 0 can do another jobs, but I need a way to show them System.cmd log line by line when is running…

---

## [I can't translate a terminal command to System.cmd/3](https://forum.elixirforum.com/t/i-cant-translate-a-terminal-command-to-system-cmd-3/46918)

<div class="topic-metadata">

**Author:** [@Samuel-88](https://forum.elixirforum.com/u/Samuel-88)\
**Replies:** 6\
**Last updated:** [March 30, 2022, 5:26pm UTC](https://forum.elixirforum.com/t/i-cant-translate-a-terminal-command-to-system-cmd-3/46918 "2022-03-30T17:26:44Z")

</div>

Hello all, I’m trying to run the following terminal command inside Elixir: curl -X POST http://localhost:4004/api/converter -H "Content-Type: application/json" -d '{"html": "a", "organization\_id": "9213898231sadasd000"…

---

## [Can't properly format CURL parameters with \`System.cmd/2\`](https://forum.elixirforum.com/t/cant-properly-format-curl-parameters-with-system-cmd-2/46794)

<div class="topic-metadata">

**Author:** [@Dlacreme](https://forum.elixirforum.com/u/Dlacreme)\
**Replies:** 2\
**Last updated:** [March 25, 2022, 10:28pm UTC](https://forum.elixirforum.com/t/cant-properly-format-curl-parameters-with-system-cmd-2/46794 "2022-03-25T22:28:31Z")

</div>

Hi guys ! I need to run a one-time HTTP query in one of my projects, it needs to include a PEM certificate and since I was not able to find any documentation on how to do it with either hackney or mint, I decided to do …

---

## [Dialyzer seems not to expect System.cmd to return a non-zero code](https://forum.elixirforum.com/t/dialyzer-seems-not-to-expect-system-cmd-to-return-a-non-zero-code/45240)

<div class="topic-metadata">

**Author:** [@Sinc](https://forum.elixirforum.com/u/Sinc)\
**Replies:** 2\
**Last updated:** [January 14, 2022, 8:21pm UTC](https://forum.elixirforum.com/t/dialyzer-seems-not-to-expect-system-cmd-to-return-a-non-zero-code/45240 "2022-01-14T20:21:43Z")

</div>

I ran dialyzer on this new code (with both Elixir 1.7 and 1.12) and am getting the error: The pattern variable\_error can never match, because previous clauses completely cover the type :ok. It points at the line in ma…

---

## [DateTime.to\_unix() vs System.os\_time()](https://forum.elixirforum.com/t/datetime-to-unix-vs-system-os-time/43938)

<div class="topic-metadata">

**Author:** [@silverdr](https://forum.elixirforum.com/u/silverdr)\
**Replies:** 4\
**Last updated:** [November 17, 2021, 9:03pm UTC](https://forum.elixirforum.com/t/datetime-to-unix-vs-system-os-time/43938 "2021-11-17T21:03:42Z")

</div>

DateTime documentation contains the following sentence: If you want to get the current time in Unix seconds, do not do DateTime.utc\_now() |\> DateTime.to\_unix() . Simply call System.os\_time(:second) instead. Nice, but…

---

## [Keeping system ENVs secure?](https://forum.elixirforum.com/t/keeping-system-envs-secure/41167)

<div class="topic-metadata">

**Author:** [@fireproofsocks](https://forum.elixirforum.com/u/fireproofsocks)\
**Replies:** 2\
**Last updated:** [July 27, 2021, 5:09pm UTC](https://forum.elixirforum.com/t/keeping-system-envs-secure/41167 "2021-07-27T17:09:18Z")

</div>

I’m seeking some advice to help the security posture of a package of mine, dotenvy. There has been some discussion around keeping system ENVs secure in one of the feature requests: https://github.com/fireproofsocks/dot…

---

## [Using elixir variable as System.cmd input](https://forum.elixirforum.com/t/using-elixir-variable-as-system-cmd-input/37568)

<div class="topic-metadata">

**Author:** [@csuriano23](https://forum.elixirforum.com/u/csuriano23)\
**Replies:** 5\
**Last updated:** [February 16, 2021, 7:41am UTC](https://forum.elixirforum.com/t/using-elixir-variable-as-system-cmd-input/37568 "2021-02-16T07:41:04Z")

</div>

Hi there, I was wondering if there is a way to redirect input to a system command from an elixir variable instead that from a file. In other words I’d like to invoke a command like this: wc -l \< myfile using Elixir’s…

---

## [Error when calling System.stop(0)](https://forum.elixirforum.com/t/error-when-calling-system-stop-0/36990)

<div class="topic-metadata">

**Author:** [@lud](https://forum.elixirforum.com/u/lud)\
**Replies:** 0\
**Last updated:** [January 21, 2021, 10:02am UTC](https://forum.elixirforum.com/t/error-when-calling-system-stop-0/36990 "2021-01-21T10:02:03Z")

</div>

Hi, I run a small elixir script that terminates by calling System.stop(0), Sometimes I have this error after the call: \*\* (EXIT from #PID\<0.94.0\>) an exception was raised: \*\* (ArgumentError) argument error …

---

## [Error when using System.cmd](https://forum.elixirforum.com/t/error-when-using-system-cmd/33642)

<div class="topic-metadata">

**Author:** [@HaydenAscot](https://forum.elixirforum.com/u/HaydenAscot)\
**Replies:** 9\
**Last updated:** [August 9, 2020, 1:40pm UTC](https://forum.elixirforum.com/t/error-when-using-system-cmd/33642 "2020-08-09T13:40:49Z")

</div>

Hi there, I’m having some trouble with the “System” module, specifically the cmd function. My code is the following, which is exactly the same as the documentation, StackOverflow/Elixir forum answers, etc: System.cmd("e…

---

## [Peculiar interaction between System.cmd/2 and "git log"](https://forum.elixirforum.com/t/peculiar-interaction-between-system-cmd-2-and-git-log/29122)

<div class="topic-metadata">

**Author:** [@Rich\_Morin](https://forum.elixirforum.com/u/Rich_Morin)\
**Replies:** 1\
**Last updated:** [February 15, 2020, 11:26pm UTC](https://forum.elixirforum.com/t/peculiar-interaction-between-system-cmd-2-and-git-log/29122 "2020-02-15T23:26:19Z")

</div>

I just ran into some peculiar behavior when using System.cmd/2 to invoke git log. Can someone tell me what is going on? When I run git log from the command line, the string “format:” does not appear in the result: $ gi…

---

## [Mutating Application env with put\_env in containers, good or bad?](https://forum.elixirforum.com/t/mutating-application-env-with-put-env-in-containers-good-or-bad/26406)

<div class="topic-metadata">

**Author:** [@darnahsan](https://forum.elixirforum.com/u/darnahsan)\
**Replies:** 8\
**Last updated:** [October 30, 2019, 4:42am UTC](https://forum.elixirforum.com/t/mutating-application-env-with-put-env-in-containers-good-or-bad/26406 "2019-10-30T04:42:26Z")

</div>

I have this slack bot app with an api to check for stats. As its containerised with docker. I was using env file via docker-compose. The app was using System.get\_env to fetch values every time which obviously doesn’t sou…
