The simplest option is to just back up everything in the filesystem and carry it over.
To find out where your data is, look at the datadir variable with in mysql
test> show variables like 'datadir';
+---------------+-------------------+
| Variable_name | Value |
+---------------+-------------------+
| datadir | /var/lib/mysql/ |
+---------------+-------------------+
1 row in set (0.00 sec)
Note Your actual value may differ.
Then from your shell shut down mysql, back it up and copy it over. Something like:
> sudo service mysql shutdown
> cd /var/lib/mysql
> sudo tar -czf /path/with/enough/space/db.tgz *
Copy your db.tgz over to your new server and uncompress it on your new servers datadir while it is shutdown
To check if database or listener is running on Linux, you could check if Oracle processes are running, for example ps aux | grep pmon(or grep lsnr for listener).
Pmon is process monitor, process responsible for "housekeeping", like freeing buffer cache or some resources that are not in use anymore. It is always running if the instance is up ( but this process does not guarantee that you can connect, because the database could be started in mount mode, anyway it is a start of a troubleshooting ).
It seems that you didn't set ORACLE_SID, ORACLE_BASE, ORACLE_HOME and PATH variables. On link that you provided, environment variables are set at the runtime. You could permanently set them in your .bashrc or bash_profile file.
Add these lines to your .bashrc file(it is in your users home directory, for example /home/oracle/.bashrc).
ORACLE_SID=name_of_your_database
ORACLE_BASE=/oracle/base/
ORACLE_HOME=/oracle/base/dbhome_1
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export ORACLE_SID ORACLE_BASE ORACLE_HOME PATH
Reload new bash profile with command - source .bashrc and try again and read Oracle installation documentation for more detalis.
However, since Ubuntu is not supported OS for Oracle, there is no way to know for sure what the problem really is or was. If installation is for learning purpose, easier for you will be to install some supported OS in a VirtualBox for example, or to use Oracle prebuild VMs.
Best Answer
Oracle does NOT support Ubuntu. From the documentation:
https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/operating-system-checklist-for-oracle-database-installation-on-linux.html#GUID-E5C0A90E-7750-45D9-A8BC-C7319ED934F0
The following Linux x86-64 kernels are supported:
Oracle Linux 8.1 with the Unbreakable Enterprise Kernel 6: 5.4.17-2011.0.7.el8uek.x86_64 or later Oracle Linux 8 with the Red Hat Compatible kernel: 4.18.0-80.el8.x86_64 or later
Oracle Linux 7.4 with the Unbreakable Enterprise Kernel 4: 4.1.12-124.19.2.el7uek.x86_64 or later Oracle Linux 7.4 with the Unbreakable Enterprise Kernel 5: 4.14.35-1818.1.6.el7uek.x86_64 or later Oracle Linux 7.7 with the Unbreakable Enterprise Kernel 6: 5.4.17-2011.4.4.el7uek.x86_64 or later Oracle Linux 7.5 with the Red Hat Compatible Kernel: 3.10.0-862.11.6.el7.x86_64 or later
Red Hat Enterprise Linux 8: 4.18.0-80.el8.x86_64 or later
Red Hat Enterprise Linux 7.5: 3.10.0-862.11.6.el7.x86_64 or later
SUSE Linux Enterprise Server 15: 4.12.14-23-default or later
SUSE Linux Enterprise Server 12 SP3: 4.4.162-94.72-default or later
Ubuntu is an entirely different branch of Linux, and no matter how many people claim they have hacked it to work, it is NOT supported and results are NOT guaranteed.