ipcmk Command Examples in Linux

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.

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