ipcrm command in Linux with examples
ipcrm command in Linux is used to remove some IPC(Inter-Process Communication) resources. It eliminates the IPC objects and their associated data structure form the system. One must be a creator or superuser or the owner of the object in order to remove these objects. There are three types of System V IPC objects i.e. semaphores, shared memory, and message queues.
Note: When all the currently attached processes will remove the object from their virtual address space then only shared memory object can be removed.
Syntax:
ipcrm [options]
or
ipcrm {shm|msg|sem} id...
Options:
- -a, –all [shm] [msg] [sem] : Remove all resources. When an option argument is provided, the removal is performed only for the specified resource types.
- -M, –shmem-key shmkey : Remove the shared memory segment created with shmkey after the last detach is performed.
- -m, –shmem-id shmid : Remove the shared memory segment identified by shmid after the last detach is performed.
- -Q, –queue-key msgkey : Remove the message queue created with msgkey.
- -q, –queue-id msgid : Remove the message queue identified by msgid.
- -S, –semaphore-key semkey : Remove the semaphore created with semkey.
- -s, –semaphore-id semid : Remove the semaphore identified by semid.
- -V, –version : Display version information and exit.

- -h, –help : Display help text and exit.

Recommended Posts:
- ps command in Linux with Examples
- bg command in Linux with Examples
- fg command in Linux with examples
- gs command in Linux with Examples
- cp command in Linux with examples
- cut command in Linux with examples
- w command in Linux with Examples
- which command in Linux with examples
- cc command in Linux with Examples
- col command in Linux with Examples
- tee command in Linux with examples
- gcc command in Linux with examples
- ex command in Linux with examples
- ar command in Linux with examples
- df Command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



