Kernel controls live under session and status.
colab session kernel list
colab session kernel current
colab session kernel select
colab session kernel select python3
colab session kernel specs
colab session kernel start --spec julia-1.10
colab session kernel interrupt
colab session kernel restart --yes
colab session kernel shutdown --yes
colab session kernel refresh
colab status kernel --refreshsession kernel select stores the active kernel for the selected session.
Without an argument it opens a TTY picker. Outside a TTY, pass the kernel id or
name.
The picker shows selected marker, name, language, version, state, and a shortened kernel id.
session kernel interrupt sends a Jupyter kernel interrupt. If the kernel is
busy, pass --yes or confirm interactively.
session kernel restart always needs --yes outside an interactive prompt.
Restarting loses variables and in-kernel state.
session kernel shutdown also needs confirmation because it may break the
current session.
colab detects language from Jupyter kernel_info_reply first:
language_info.name- kernelspec language
- kernelspec or kernel name fallback
- unknown
Detected language and version are cached in the local session record. Run
colab session kernel refresh to refresh kernels, kernelspecs, and
language info.
Use run pkg when you want the active kernel to decide the package tool:
colab run pkg add numpy pandas
colab run pkg list
colab run pkg update
colab run pkg restore requirements.txt
colab run pkg checkPython routes to pip. Julia routes to Pkg. R routes to base package helpers
and renv where requested.
If language is unknown:
package tooling is not available for this kernel
fix: use `colab run code --code "..."`
When the cached active kernel is Python, run --help shows run pip:
colab run pip install torch
colab run pip freeze
colab run pip listrun pip is blocked when cached metadata says the active kernel is Julia or R.
When the cached active kernel is Julia, use generic package commands:
colab run pkg add CSV DataFrames
colab run pkg status
colab run pkg restore
colab run pkg updateWhen the cached active kernel is R, use generic package commands:
colab run pkg add dplyr
colab run pkg list
colab run pkg restore
colab run pkg statusLanguage-specific parser paths may exist for scripts, but public help should guide users through run pkg.
Normal help does not call the network. It uses cached kernel metadata. If no cache exists, help shows generic package tooling and this hint:
kernel tools adapt after `colab session kernel refresh`