-1

I am working on a server running ubuntu 18.04. This digital ocean tutorial on django deployment(https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04) is telling me to do the following: "We’re now finished configuring our Django application. We can back out of our virtual environment by typing:

(env): deactivate" I am familiar with virtual environments, I did this. Now for the part I am not at all familiar with: "Start by creating and opening a systemd socket file for Gunicorn with sudo privileges:

sudo nano /etc/systemd/system/gunicorn.socket

"

First, since I just deactivated my env, I am now at justin@ubuntu-s-1vcpu-1gb-nyc3-01:~$. If I ls I only see the project folder I created which holds the virtualenv, the python project, manage.py and the static directory. Nowhere can I find this

/etc/systemd/system/

directory and the command they are telling me to use cannot create directories, only files. So I am very confused, any help would be greatly appreciated.

Justin
  • 1,329
  • 3
  • 16
  • 25

1 Answers1

1

/etc doesn't live inside ~. Try ls /etc to see what's already in that directory. If you need to create that directory, you can do so wih sudo mkdir -p /etc/systemd/system/ (the -p flag is to make sure that, in case systemd is also not present under etc, it will get created).

Gabriela Melo
  • 588
  • 1
  • 4
  • 15
  • `ls /etc` showed a folder with a whole lot of contents. Is this a hidden folder? – Justin Feb 16 '20 at 20:36
  • 1
    It's not a hidden folder, it's just a folder not under `~`. Note that `~` maps to `/home/` (in your case I believe it will be `/home/justin`). So `etc` and `home` are sibling folders, and by using `ls .` from `home/justin` it will therefore not be shown. – Gabriela Melo Feb 16 '20 at 20:39
  • Awesome, thank you Gabriela. I was stuck on this for close to 2 hours now. I now wrote to the file successfully, on to the next step... – Justin Feb 16 '20 at 20:41