---
name: "shmget"
section: "1"
platform: "linux"
package: "selinux"
version: "2002031409-4"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/shmget"
---

# shmget(1)

allocate a System V IPC shared memory segment

## NAME

shmget - allocate a System V IPC shared memory segment

## SYNOPSIS

**shmget** \[-k key\] \[-c security\_context \| -s sid\] \[-b size\_in\_bytes\]

## DESCRIPTION

**shmget** allocates a shared memory segment (creating it if necessary.) The id of the memory segment allocted is printed to standard output.

### OPTIONS

- *-k*

  Key.  Allocate a memory segment with the specified key.

- *-c*

  Security Context.  Allocate a memory segment with the specified security context.

- *-s*

  Security Identifier.  Allocate a memory segment with the specified security identifier.

- *-b*

  Size in Bytes.  The size of the memory segment (in bytes) to create if a segment with the given key does not already exist.

## SEE ALSO

[**shmsid**(1)](/shmsid/1.md), [**shmread**(1)](/shmread/1.md), [**shmwrite**(1)](/shmwrite/1.md), [**shmperm**(1)](/shmperm/1.md), [**shmget**(2)](/shmget/2.md), [**shmget\_secure**(2)](/shmget_secure/2.md).
