0% found this document useful (0 votes)
14 views

Linux Commands 01OCT2025

Uploaded by

Thakur Bunty
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Linux Commands 01OCT2025

Uploaded by

Thakur Bunty
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 9

Unix/Linux Commands:

[oracle@linux ~]$ uname -a ( It tells about OS details )


Linux linux 5.15.0-3.60.5.1.el8uek.x86_64 #2 SMP Wed Oct 19 20:04:48 PDT 2022
x86_64 x86_64 x86_64 GNU/Linux

[oracle@linux ~]$ pwd ( It is present Working Directory )


/refresh/home

[oracle@linux ~]$ ls -lrt ( It list all the files and folders in the directory )
total 44
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Templates
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Public
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Documents
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Videos
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Pictures
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Music
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Downloads
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Desktop
drwxr-xr-x 4 oracle oracle 4096 May 17 16:07 app
-rw-rw-r-- 1 oracle oracle 4476 Jun 12 15:58 Template_Information.txt

[oracle@linux ~]$ cd Desktop ( Change Directory )


[oracle@linux Desktop]$ pwd
/refresh/home/Desktop

[oracle@linux Downloads]$ pwd


/refresh/home/Downloads
[oracle@linux Downloads]$ cd .. ( To come 1 folder back )
[oracle@linux ~]$ pwd
/refresh/home

[oracle@linux ~]$ mkdir BUNTY ( To create a folder )


[oracle@linux ~]$ pwd
/refresh/home
[oracle@linux ~]$ ls -lrt
total 52
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Templates
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Public
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Documents
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Videos
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Pictures
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Music
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Downloads
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Desktop
drwxr-xr-x 4 oracle oracle 4096 May 17 16:07 app
-rw-rw-r-- 1 oracle oracle 4476 Jun 12 15:58 Template_Information.txt
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:40 VIPUL
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:42 BUNTY
[oracle@linux ~]$

Root - Super user. ( It has all the privilages )


Oracle - For managing database ( It has privilages related to databases file and
folders ).

[root@linux refresh]# sudo su - oracle ( To switch from root to oracle ) (SU -


Switch user )

************************************************************************
** Note that the listener is set up to run locally (unbound.us.oracle.com)
**
** If you need to access the database outside this machine do the following:
**
** vi /etc/hosts to add machine ip and hostname details. For example:
**
** 10.10.10.123 celvpvm12345.us.oracle.com celvpvm12345
**
** edit listener.ora and change 'localhost' to hostname
** edit tnsnames.ora and change 'unbound' to hostname
************************************************************************
**
**
************************************************************************
** ORACLE_HOME=/refresh/home/app/oracle/product/23.4.0
** ORACLE_SID=orcl
** TNS_ADMIN=/refresh/home/app/oracle/product/23.4.0/network/admin
**
** type cdo to cd to ORACLE_HOME
************************************************************************
[oracle@linux ~]$

[oracle@linux ~]$ pwd


/refresh/home
[oracle@linux ~]$ ls -rlt
total 52
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Templates
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Public
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Documents
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Videos
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Pictures
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Music
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Downloads
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Desktop
drwxr-xr-x 4 oracle oracle 4096 May 17 16:07 app
-rw-rw-r-- 1 oracle oracle 4476 Jun 12 15:58 Template_Information.txt
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:40 VIPUL
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:42 BUNTY
[oracle@linux ~]$ pwd
/refresh/home
[oracle@linux ~]$ cat Template_Information.txt ( For viewing the content of a
file )
====================
Template Information
====================

Oracle Database 23.4.0.0.0 -- Internal Only -- Oracle Linux 8 Update 6

Post Deployment Configuration


-----------------------------
Environment is set on logon

Listener and database parameters (local_listener and listener_networks) are set to


run locally. If you need to change:
1. vi /etc/hosts to add machine ip and hostname details. For example:
10.10.10.123 celvpvm12345.us.oracle.com celvpvm12345
2. cd $TNS_ADMIN
3. vi listener.ora and change all 'localhost' entries to hostname of current VM,
then save and quit
4. vi tnsnames.ora and change all 'unbound' entries to hostname of current VM,
then save and quit
5. connect to database: sqlplus / as sysdba
6. if database is not running start: startup
7. change local_listener: alter system set
local_listener='(ADDRESS=(PROTOCOL=tcp)(HOST=<new hostname>)(PORT=1521))'
scope=both;
8. start listener: lsnrctl start
9. give it a minute or two then verify listener detects db services: lsnrctl
status

Other Information
-----------------

::

Creator : [email protected]
Built From : created from OEL 8.6 template
Build Date : 23 May 2024
Update Date : 12 June 2024

==================
Machine: Machine 1
==================

+---------------------+---------------------------------------------+
| Hostname | Not static |
+---------------------+---------------------------------------------+
| Static Hostname | No |
+---------------------+---------------------------------------------+
| HD free space | /refresh 46gb |
+---------------------+---------------------------------------------+
| OS Name | Oracle Enterprise Linux 8 |
+---------------------+---------------------------------------------+
| OS Language | US English |
+---------------------+---------------------------------------------+
| Service Pack/Update | Update 6 |
+---------------------+---------------------------------------------+
| Chipset | 64bit |
+---------------------+---------------------------------------------+

OS Accounts
-----------

+-----------------+---------------+
| Username | Password |
+=================+===============+
| root | Welcome1 |
+-----------------+---------------+
| oracle | Welcome1 |
+-----------------+---------------+

VNC Access
----------

* Hostname: <IP/machine_name>:2
* Username: (none)
* Password: Welcome1

Oracle Software
---------------

+---------------------------------------+---------------+-----------------------
+---------------------------------------+
| Product | Version | Ports allocated |
URLs |
+=======================================+===============+=======================+==
=====================================+
| Oracle Database | 23.4.0.0.0 | 1521 |
|
+---------------------------------------+---------------+-----------------------
+---------------------------------------+
| Oracle Database Client | 23.4.0.0.0 | |
|
+---------------------------------------+---------------+-----------------------
+---------------------------------------+
| Oracle VM VirtualBox Guest Additions | 4.2.36 | |
|
+---------------------------------------+---------------+-----------------------
+---------------------------------------+

Product Accounts
----------------

+-----------------------------------------------+-----------------------
+---------------+---------------+
| Application/url | Instance/Domain | Username
| Password |
+===============================================+=======================+==========
=====+===============+
| Oracle Database | orcl |
sys/system | Welcome1 |
+-----------------------------------------------+-----------------------
+---------------+---------------+

Third Party Software


--------------------

* FireFox

[oracle@linux ~]$
[oracle@linux ~]$ vi Template_Information.txt ( To edit a file )
[oracle@linux ~]$ cat Template_Information.txt
vk-test

====================
Template Information
====================

Oracle Database 23.4.0.0.0 -- Internal Only -- Oracle Linux 8 Update 6

Post Deployment Configuration


-----------------------------
Environment is set on logon

Listener and database parameters (local_listener and listener_networks) are set to


run locally. If you need to change:
1. vi /etc/hosts to add machine ip and hostname details. For example:
10.10.10.123 celvpvm12345.us.oracle.com celvpvm12345
2. cd $TNS_ADMIN
3. vi listener.ora and change all 'localhost' entries to hostname of current VM,
then save and quit
4. vi tnsnames.ora and change all 'unbound' entries to hostname of current VM,
then save and quit
5. connect to database: sqlplus / as sysdba
6. if database is not running start: startup
7. change local_listener: alter system set
local_listener='(ADDRESS=(PROTOCOL=tcp)(HOST=<new hostname>)(PORT=1521))'
scope=both;
8. start listener: lsnrctl start
9. give it a minute or two then verify listener detects db services: lsnrctl
status

Other Information
-----------------

::

Creator : [email protected]
Built From : created from OEL 8.6 template
Build Date : 23 May 2024
Update Date : 12 June 2024

==================
Machine: Machine 1
==================

+---------------------+---------------------------------------------+
| Hostname | Not static |
+---------------------+---------------------------------------------+
| Static Hostname | No |
+---------------------+---------------------------------------------+
| HD free space | /refresh 46gb |
+---------------------+---------------------------------------------+
| OS Name | Oracle Enterprise Linux 8 |
+---------------------+---------------------------------------------+
| OS Language | US English |
+---------------------+---------------------------------------------+
| Service Pack/Update | Update 6 |
+---------------------+---------------------------------------------+
| Chipset | 64bit |
+---------------------+---------------------------------------------+

OS Accounts
-----------

+-----------------+---------------+
| Username | Password |
+=================+===============+
| root | Welcome1 |
+-----------------+---------------+
| oracle | Welcome1 |
+-----------------+---------------+

VNC Access
----------

* Hostname: <IP/machine_name>:2
* Username: (none)
* Password: Welcome1

Oracle Software
---------------

+---------------------------------------+---------------+-----------------------
+---------------------------------------+
| Product | Version | Ports allocated |
URLs |
+=======================================+===============+=======================+==
=====================================+
| Oracle Database | 23.4.0.0.0 | 1521 |
|
+---------------------------------------+---------------+-----------------------
+---------------------------------------+
| Oracle Database Client | 23.4.0.0.0 | |
|
+---------------------------------------+---------------+-----------------------
+---------------------------------------+
| Oracle VM VirtualBox Guest Additions | 4.2.36 | |
|
+---------------------------------------+---------------+-----------------------
+---------------------------------------+

Product Accounts
----------------

+-----------------------------------------------+-----------------------
+---------------+---------------+
| Application/url | Instance/Domain | Username
| Password |
+===============================================+=======================+==========
=====+===============+
| Oracle Database | orcl |
sys/system | Welcome1 |
+-----------------------------------------------+-----------------------
+---------------+---------------+

Third Party Software


--------------------

* FireFox

[oracle@linux ~]$

[oracle@linux ~]$ chmod 777 Template_Information.txt ( To change the file


permission)
[oracle@linux ~]$ ls -lrt
total 52
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Templates
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Public
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Documents
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Videos
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Pictures
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Music
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Downloads
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Desktop
drwxr-xr-x 4 oracle oracle 4096 May 17 16:07 app
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:40 VIPUL
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:42 BUNTY
-rwxrwxrwx 1 oracle oracle 4486 Oct 1 18:51 Template_Information.txt
[oracle@linux ~]$

[root@linux home]# ls -rlt


total 52
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Templates
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Public
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Documents
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Videos
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Pictures
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Music
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Downloads
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Desktop
drwxr-xr-x 4 oracle oracle 4096 May 17 16:07 app
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:40 VIPUL
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:42 BUNTY
-rwxr-xr-x 1 oracle oracle 4486 Oct 1 18:51 Template_Information.txt

[root@linux home]# chown -R root:root BUNTY ( For changing the ownership )


[root@linux home]# ls -lrt
total 52
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Templates
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Public
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Documents
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Videos
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Pictures
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Music
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Downloads
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Desktop
drwxr-xr-x 4 oracle oracle 4096 May 17 16:07 app
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:40 VIPUL
drwxrwxr-x 2 root root 4096 Oct 1 18:42 BUNTY
-rwxr-xr-x 1 oracle oracle 4486 Oct 1 18:51 Template_Information.txt
[root@linux home]#

[root@linux home]# chown -R oracle:oracle BUNTY ( -R - Recursive - It will change


ownership of all the files and folder inside that directory )

[root@linux home]# ls -lrt


total 52
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Templates
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Public
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Documents
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Videos
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Pictures
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Music
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Downloads
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Desktop
drwxr-xr-x 4 oracle oracle 4096 May 17 16:07 app
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:40 VIPUL
-rwxr-xr-x 1 oracle oracle 4486 Oct 1 18:51 Template_Information.txt
drwxrwxr-x 3 oracle oracle 4096 Oct 1 19:00 BUNTY
[root@linux home]# cd BUNTY
[root@linux BUNTY]# ls -rlt
total 4
drwxr-xr-x 2 oracle oracle 4096 Oct 1 19:00 MK
[root@linux BUNTY]# pwd
/refresh/home/BUNTY
[root@linux BUNTY]#

[root@linux home]# ls -lrt


total 48
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Templates
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Public
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Documents
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Videos
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Pictures
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Music
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Downloads
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Desktop
drwxr-xr-x 4 oracle oracle 4096 May 17 16:07 app
drwxrwxr-x 2 oracle oracle 4096 Oct 1 18:40 VIPUL
-rwxr-xr-x 1 oracle oracle 4486 Oct 1 18:51 Template_Information.txt
[root@linux home]# rm -rf VIPUL ( TO remove a directly )
[root@linux home]# ls -lrt
total 44
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Templates
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Public
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Documents
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Videos
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Pictures
drwxr-xr-x. 2 oracle oracle 4096 Jul 19 2019 Music
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Downloads
drwxr-xr-x. 2 oracle oracle 4096 Feb 24 2021 Desktop
drwxr-xr-x 4 oracle oracle 4096 May 17 16:07 app
-rwxr-xr-x 1 oracle oracle 4486 Oct 1 18:51 Template_Information.txt
[root@linux home]#

You might also like