# netlab: Switch to Lab Directory After an SSH Session Loss

DevFeed: [netlab: Switch to Lab Directory After an SSH Session Loss](<https://devfeed.tech/articles/netlab-switch-to-lab-directory-after-an-ssh-session-loss-11350.md>)

Original publisher: [Read original article](<https://blog.ipspace.net/2026/03/netlab-switch-lab-directory/>)

Published: 2026-03-23T07:31:00Z

Content type: tutorial

Language: en

Sources: [ipSpace.net blog](<https://devfeed.tech/sources/ipspace-net-blog.md>)

Topics: [ssh](<https://devfeed.tech/topics/ssh.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Scripting, bash](<https://devfeed.tech/topics/scripting-bash.md>), [Unix](<https://devfeed.tech/topics/unix.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Script](<https://devfeed.tech/topics/script.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [netlab](<https://devfeed.tech/tags/netlab.md>), [script](<https://devfeed.tech/tags/script.md>), [server](<https://devfeed.tech/tags/server.md>), [ssh](<https://devfeed.tech/tags/ssh.md>)

## AI overview

This tutorial shows how to use netlab status and jq in a Bash alias to return to the directory of a lab after reconnecting to a netlab server following an SSH session loss.

## Source excerpt

I work on a laptop that loves to power down when not used (the right thing to do), which often breaks the SSH session to my netlab server (not so good). Reconnecting is trivial. Figuring out which lab I was working on and where it lives on the disk after a few hours? That's the annoying part. We solved most of that ages ago with the netlab status --all command. It shows all running labs1 and their directories, so you can quickly jump back to where you were. However, even that gets tedious the 100th time you have to do it. Read more ...