Switching to an Oracle user

First, run the following command to log in as an oracle user:

          $ su - oracle
  

In this case, the user was a student and after running this command, the user will be oracle.

Now, log in to your Oracle Database by running the following command:

          $ sqlplus sys as sysdba
  

Enter the password you set earlier when installing Oracle. After the successful execution of this command, you will get the SQL> prompt:

[oracle@localhost work]$ sqlplus sys as sysdba 
 
SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 30 12:02:53 2018 
 
Copyright (c) 1982, 2009, Oracle.  All rights reserved. 
 
Enter password:  
Connected to an idle instance. 
 
SQL> 

Get Learning Linux Shell Scripting - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.