How do I get slug of all active plugins programmatically?

Use option active_plugins to get all plugin init files. e.g.

$current = get_option( 'active_plugins', array() );
// print_r( $current );

Here, htmlpress is the plugin slug.

enter image description here

techhipbettruvabetnorabahisbahis forumutaraftarium24edueduedueduedusedusedueduseduedus