How to turn off and restart Linux ?
Shutting down, rebooting the computer from the shell or command line
Below is a list the commands that will enable a user to shut down, turn off, reboot, etc. their Linux computer from the command line.
- halt
- poweroff
- reboot
- shutdown
Commands with options:
/sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h]
/sbin/reboot [-n] [-w] [-d] [-f] [-i]
/sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]
/sbin/reboot [-n] [-w] [-d] [-f] [-i]
/sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]
OPTIONS
- -n
- Don't sync before reboot or halt.
- -w
- Don't actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).
- -d
- Don't write the wtmp record. The -n flag implies -d.
- -f
- Force halt or reboot, don't call shutdown
- -i
- Shut down all network interfaces just before halt or reboot.
- -h
- Put all harddrives on the system in standby mode just before halt or poweroff.
- -p
- When halting the system, do a poweroff. This is the default when halt is called as poweroff.
- Simply, Reboot command restart the Linux servers.

How to start oracle database ?
Starting the Oracle Database
There are certain ways to start oracle database like:- Using SQLPLUS
- Using Oracle Enterprise manager (If DB is configured with EM)
- Using Oracle Grid/cloud control (If DB is configured with GC)
1. Logon to the database server as the administrator/OS user2. To start the database instance, go to Start -> Settings -> Control Panel -> Administrative Tools -> Services.
2. Scroll down to the service for the Listener and start listener on right click
3. Scroll down to the service for the database, for example: OracleServiceORCL
4. Right click and select Start. A dialog box appears showing the progress of the start-up and after a few seconds it will disappear.
The database instance service is now started.
5. Start a command window (Start -> Run -> type cmd) from which to start the database itself.
6. Issue the command to check that the ORACLE_SID is set to the correct value:
echo %ORACLE_SID% (If not then set correct ORACLE_HOME value)
NOTE: Expected output is ―ORCL
7. Connect to the database:
sqlplus / as sysdba
8. Typically the database will start automatically when the instance service is started .
If for some reason the database is not started, enter the following command:
startup;
Linux Database Start Up
1. Logon to the database server as the administrator/OS user
2. To start the database instance, go to Terminal and set below environment variable if already not.
On Bash shell,
export ORACLE_HOME=<ORACLE_HOME value like /u01/app/oracle/product/11.2/db_1>
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=<DB Name like orcl>
3. Start listener
lsnrctl start <Listerner_name> (not requiered if listener name is LISTENER
4. Then connect to database
sqlplus / as sysdba OR Sqlplus sys/<pwd>@<TNS> as sysdba
4.enter the following command:
startup;
Then it will connect you to SQL> prompt after database is in OPEN mode.

What is Oracle database SPFILE ?
INTRODUCING the SPFILE
Oracle provides two different types of mutually exclusive
parameter files that you can use, PFILE and SPFILE. Let’s look at the SPFILE in a bit more detail.

What is Oracle Database PFILE ?
INTRODUCING the PFILE
Oracle provides two different types of mutually exclusive
parameter files that you can use, PFILE and SPFILE. Let’s look at the PFILE in a bit more detail.
