<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-most-useful-single-line-of-elixir-i-ve-written-so-far-r4yfbtari" -->

---
title: The most useful single line of Elixir I've written so far
description: A forum member shares a one-line .iex.exs snippet that automatically opens the browser to Livebook's access URL (with the auto-generated passcode) when...
canonical: https://daily.dev/posts/the-most-useful-single-line-of-elixir-i-ve-written-so-far-r4yfbtari
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The most useful single line of Elixir I've written so far | daily.dev
og:description: A forum member shares a one-line .iex.exs snippet that automatically opens the browser to Livebook's access URL (with the auto-generated passcode) when...
og:url: https://daily.dev/posts/the-most-useful-single-line-of-elixir-i-ve-written-so-far-r4yfbtari
og:image: https://api.daily.dev/og/posts/R4yfbTARi.png
og:image:alt: The most useful single line of Elixir I've written so far
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The most useful single line of Elixir I've written so far

**[Elixir Forum](https://daily.dev/sources/elixirforum)** · 1 min read · 0 upvotes · 0 comments

## Summary

A forum member shares a one-line .iex.exs snippet that automatically opens the browser to Livebook's access URL (with the auto-generated passcode) when starting an iex session, removing the manual copy/paste step. They pair it with a custom shell command for quickly launching Phoenix apps, and invite others to share their own favorite single-line Elixir tricks.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://forum.elixirforum.com/t/the-most-useful-single-line-of-elixir-ive-written-so-far/76555>

## Questions this post answers

### How can I automatically open Livebook in my browser with the login passcode already filled in?

Add a line to your project's .iex.exs file that calls System.cmd("xdg-open", [LivebookWeb.Endpoint.access_url()]). This opens the browser directly to Livebook's access URL, which includes the auto-generated passcode, so you skip the manual copy-paste from terminal to browser when starting an iex session.

_Developers streamlining their Elixir and Livebook workflow can find more shell tricks like this shared on daily.dev._

## Similar posts on daily.dev

- [Code BEAM America 2025 - Learning Resources / Talks - Elixir Programming Language Forum](https://daily.dev/posts/code-beam-america-2025---learning-resources-talks---elixir-programming-language-forum-ovbccisnw) · Elixir Forum · 2 upvotes · 0 comments
- [One Pipe, One User Story: The Case for phoenix\_test](https://daily.dev/posts/one-pipe-one-user-story-the-case-for-phoenix-test-u7crh42r5) · ElixirStatus · 0 upvotes · 0 comments
- [Elixir Programming Language Forum](https://daily.dev/posts/elixir-programming-language-forum-vi8f60ddj) · Elixir Forum · 1 upvotes · 0 comments
- [SAFE for Elixir: Phoenix LiveView](https://daily.dev/posts/safe-for-elixir-phoenix-liveview-1s84utcbf) · Erlang Solutions · 3 upvotes · 0 comments

---

Tags: [#elixir](https://daily.dev/tags/elixir), [#livebook](https://daily.dev/tags/livebook)

[View this post on daily.dev](https://daily.dev/posts/the-most-useful-single-line-of-elixir-i-ve-written-so-far-r4yfbtari)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The most useful single line of Elixir I've written so far","url":"https://daily.dev/posts/the-most-useful-single-line-of-elixir-i-ve-written-so-far-r4yfbtari","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-most-useful-single-line-of-elixir-i-ve-written-so-far-r4yfbtari"},"datePublished":"2026-09-03T19:53:53.526Z","dateModified":"2026-09-03T23:07:12.238Z","description":"A forum member shares a one-line .iex.exs snippet that automatically opens the browser to Livebook's access URL (with the auto-generated passcode) when...","image":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","thumbnailUrl":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","isAccessibleForFree":true,"articleSection":"Elixir Forum","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Elixir Forum","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/c7c05785a0da4507bf9ae120a7e487e6","url":"https://daily.dev/sources/elixirforum"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-most-useful-single-line-of-elixir-i-ve-written-so-far-r4yfbtari","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"elixir,livebook","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Elixir Forum","item":"https://daily.dev/sources/elixirforum"},{"@type":"ListItem","position":3,"name":"The most useful single line of Elixir I've written so far"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-most-useful-single-line-of-elixir-i-ve-written-so-far-r4yfbtari#faq","mainEntity":[{"@type":"Question","name":"How can I automatically open Livebook in my browser with the login passcode already filled in?","acceptedAnswer":{"@type":"Answer","text":"Add a line to your project's .iex.exs file that calls System.cmd(\"xdg-open\", [LivebookWeb.Endpoint.access_url()]). This opens the browser directly to Livebook's access URL, which includes the auto-generated passcode, so you skip the manual copy-paste from terminal to browser when starting an iex session. Developers streamlining their Elixir and Livebook workflow can find more shell tricks like this shared on daily.dev."}}]}
```

