System-wide startup file for Postgres 10 on Ubuntu 18.04
/etc/postgresql-common/psqlrc does work with Ubuntu packages.

Working example with Ubuntu 18.04 and PostgreSQL 11 from apt.postgresql.org.

$ echo "\echo This is the common psql rc file" | sudo tee /etc/postgresql-common/psqlrc
\echo This is the common psql rc file

$ ls -l /etc/postgresql-common/psqlrc 
-rw-r--r-- 1 root root 32 mai   23 11:36 /etc/postgresql-common/psqlrc

$ sudo -u postgres psql postgres
This is the common psql rc file
psql (11.3 (Ubuntu 11.3-1.pgdg18.04+1))
Type "help" for help.

postgres=# 


When such things don't produce the expected result, a quick way to troubleshoot is to launch the command with strace and examine failures/successes to open files within the captured stderr output.

Example:

$ sudo -u postgres strace psql postgres 2&gt;/tmp/strace-output
This is the common psql rc file
psql (11.3 (Ubuntu 11.3-1.pgdg18.04+1))
Type "help" for help.

postgres=# \q

$ grep psqlrc /tmp/strace-output 
access("/etc/postgresql-common/psqlrc-11.3 (Ubuntu 11.3-1.pgdg18.04+1)", R_OK) = -1 ENOENT (No such file or directory)
access("/etc/postgresql-common/psqlrc-11", R_OK) = -1 ENOENT (No such file or directory)
access("/etc/postgresql-common/psqlrc", R_OK) = 0
openat(AT_FDCWD, "/etc/postgresql-common/psqlrc", O_RDONLY) = 4
access("/var/lib/postgresql/.psqlrc-11.3 (Ubuntu 11.3-1.pgdg18.04+1)", R_OK) = -1 ENOENT (No such file or directory)
access("/var/lib/postgresql/.psqlrc-11", R_OK) = -1 ENOENT (No such file or directory)
access("/var/lib/postgresql/.psqlrc", R_OK) = -1 ENOENT (No such file or directory)


In your case if you have a  /etc/postgresql-common/psqlrc you will see what exact errors occur when trying to access it.