how to make a directory and set permissions in linux code example Example 1: create directory linux mkdir /tmp/newdir Example 2: linux create directory with permissions mkdir –m777 DirM