Troubleshooting – LINUX :: Part-6

2

Troubleshooting Linux

Problem: How to see the process id of a process

ps Command will return the process id of named

# ps

       PID    TTY                                           TIME   CMD

       2041    ?                                             00:00:00 named

Problem: How the view the virtual memory status?

# vmstat                 will show the virtual memory status

procs                        memory        swap          io      system       cpu

r     b    w      swpd     free   buff   cache   si    so    bi    bo    in     cs   us   sy  id

0   0   0         29084     3536       3296     44380    1    13    76    29    137    303    4     1 95

Network related

Problem: How will you know which ports are open in your linux server?

#nmap localhost

Port                        State                            Service

22/tcp                     open                            ssh

25/tcp                     open                            smtp

80/tcp                     open                            http

106/tcp                     open                          pop3pw

110/tcp                     open                          pop – 3

111/tcp                     filtered                       sunrpc

135/tcp                    filtered                        loc – srv

139/tcp                    filtered                        netbios –  ssn

143/tcp                    open                            imap2

Nmap      run    completed    – – 1   IP   address (1 host up) scanned in 8 seconds

Problem: How to view the port number and protocol of service

# vi /etc/services

Problem: How to add another super user (as root)

#user add isp set up

#vi /etc/passwd

isp set up 😡 : 0 :0 :root :/root:/bin/bash

Problem: How to login without a password

#adduser test

#passwd test – d

                                                  ——————– Thanks Everyone

Share.

About Author

TN365

2 Comments

Leave A Reply

CAPTCHA ImageChange Image