ipcmk: command not found

The “ipcmk” command is a command-line utility that is used to create various types of IPC (Inter-process Communication) resources. These resources include shared memory, message queues, and semaphores.

IPC resources created using ipcmk command need to be deleted using “ipcrm” command after they are no longer needed.

If you encounter the below error while running the command ipcmk:

ipcmk: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install util-linux
Ubuntu apt-get install util-linux
Alpine apk add util-linux
Arch Linux pacman -S util-linux
Kali Linux apt-get install util-linux
CentOS yum install util-linux
Fedora dnf install util-linux
OS X brew install util-linux
Raspbian apt-get install util-linux

ipcmk Command Examples

1. Create a shared memory segment:

# ipcmk --shmem segment_size_in_bytes

2. Create a semaphore:

# ipcmk --semaphore element_size

3. Create a message queue:

# ipcmk --queue

4. Create a shared memory segment with specific permissions (default is 0644):

# ipcmk --shmem segment_size_in_bytes octal_permissions
Related Post