Thursday, 7 September 2023

Oracle Linux Commands - part 1/4

In this post i am going to share few of the oracle Linux commands .. i have posted total 4 post for Complete Linux high level commands .


this is  part 1 .. in my next post will share part 2 commands .

 

System level information Linux Commands :::: 

========================================

date >> to display the current system date and time

host name>> to display the system name

uname >>to display the os name

uname –a >> to display os name,kernel version,hostname,os bit

Uname –r >> to display the kernel version

uptime >> to display system uptime ,load avg ,how many users working

Su – username >> it switches one user to another user

Vim /etc/passwd>> user information location path

su – username >> switch one user to another user

Arch >> to display the os bit version

Cat /proc/version >> to display the kernel version

cat /etc/redhat-release >> to know the linux version

Service iptables start / status  / stop 

Service servicename start / status / stop 


Networking related Linux commands ::::

==================== =================

ifconfig>> to display the system Ip and mac address

Ifconfig eth0 >> to display only ip address

netstat –anlp |grep ":80" >> to see the which service is running 80 port number

ping hostname >> to display to see the connection remote system available or not

netstat –anlp |grep httpd >> to see the apache running or not

dig hostname >> to display the response time on remote server

nslookup hostname >> to display the hostname is dns registered or not

telnet hostname portno >> to see the remote server and port is available or not

nc -vz hostname portno >> to see the remote server and port is available or not here >> nc means net cat

Nmap hostname>> it is used for port number scanner

 

File creation and updating related Linux commands ::::

==================================================


Vim filename >> to display the file content and add the file content

 option which we need to use after vi / vim commands we used , follow the below option to save / quit / update / insert option insdie the file.

Esc mode:

:wq ---save and quit

:q!—forcebully quit

Yy – copy the line,P --- paste the line

Shift +gg ----- go to firstline

Shift+g -------go to last line

U –undo last delete or modified line

:set nu---to be set number on file

Dd --- to delete the line

/searchkeyword >>- to be search keyword in particular file existed or not

n – to search next word by top to down

N – to search next word by down to top

:%/oldkeyword/newkeyword/gc it is replace old name to newname

I ---insert the data

cat >filename.txt >> to be create file and to give the data and save the data in a file

cat filename>> to be see the content of the file

cat >> filename.txt >> to be append the data already existing file

touch>> to be create the empty file

touch filename>> to be create the empty or change the timestamp for file

View filename>> to display the content of the file 

more filename>> it displays the content of file

Head filename >> to display the first 10 lines in a file

Head -100f filename >> to display the first 100 lines in a file

Head –n 5 filename >> to display the first 5 lines in a file

tail filename >> to display the last 10 lines in a file

tail -50f filename >> to display the last 50 lines in a file

tail –f filename >> to see the running content process file

Rm file>> it remove the file with conformation

Rm –rf filename :– it remove the file without confirmation

 

Thanks,

Srini

No comments:

Post a Comment


No one has ever become poor by giving