If you want to do it via CLI you can use either a conf file or pass the -subj argument. Here's an example with -subj
openssl req -new -newkey rsa:2048 -nodes -subj "/CN=somedomain.com/O=My Corporation/OU=Org Unit 1/OU=Org Unit 2"
You can add in ST, L, C, and any other shortName OpenSSL recognizes (along with raw OIDs).