Open In App

aconnect Command in Linux with Examples

Improve
Improve
Like Article
Like
Save
Share
Report

aconnect command is used to connect two ports on the ALSA sequencer system.  ALSA (Advanced Linux Sound Architecture) is a framework which is part of the Linux kernel that provides an API for sound card device drivers and the ALSA sequencer interface is designed to deliver MIDI-like events between clients and ports.

Syntax:

aconnect [-d] [-options] sender receiver
aconnect -i|-o [-options]
aconnect -x

Example:

aconnect  0:0 14:0

The above example connects port 0:0(sender) to port 14:0(receiver) and the flow of data is one-way. Multiple receivers can be attached to one single sender.  No output is displayed for this particular command.

Options:

1. -d Option (Disconnect): This option is used to disconnect an already established connection.

Example:

aconnect -d 0:0 14:0

Output: No output is displayed for this particular command. But the connection between the given two ports has been disconnected.

2. -e Option (Exclusive Mode): This option ensures that the connection established is exclusive. Any other connection attempt with either the sender or receiver would result in error.

Example:

aconnect -e 0:0 14:0

Output: No output is displayed for this particular command

3. -i Option (Input Ports): This option lists all the readable/input ports available.

Example:

aconnect -i

Output:

4. -o Option (Output Ports): This option lists all the writable/output ports available.

Example:

aconnect -o

Output:

5. -l Option (List): This option lists the current connection status. All the connected ports are listed together.

Example:

aconnect -l

Output:

6. -x Option (Remove All): This particular option is used to terminate all existing connections.

Example Syntax:

aconnect -x

Output: No output is displayed for this particular command


Last Updated : 22 Jun, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads