# linux generate csr

openssl req -new -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr

**Here is what the above code is Doing:**

1. openssl is the command for executing OpenSSL

2. req is the OpenSSL utility for generating a CSR

3. -new tells OpenSSL to create a new CSR

4. -newkey rsa:2048 tells OpenSSL to generate a new private key using RSA and a key length of 2048 bits

5. -nodes tells OpenSSL to skip the option to secure our private key with a passphrase

6. -keyout domain.key tells OpenSSL to store the private key in a file named domain.key

7. -out domain.csr tells OpenSSL to store the CSR in a file named domain.csr