how to transmit commitment transaction (unilateral close) from lightning network channel
Generally it is preferable to collaboratively close a channel as it is faster for both sides and saves onchain fees and space. As far as I know implementations do not provide an api to the close command by which you can enforce a certain type of close. In order to achieve what you want you have 2 options:


You Patch your lightning node to provide that api yourself
You run two lightning nodes with a channel between them. Then you turn off one node and run the close command on the other. As the first node is not peered the nodes can't close collaboratively so there will happen a force close.