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

Basic Commands Worked On SOLARIS

The document provides commands to check system information on a Linux system such as hostname, architecture, uptime, logged in users, shell and more. It also shows the outputs of commands like date, cal, echo, man and yes. Key commands checked include uname, uptime, who, w, top, finger, cal, echo, man and history.

Uploaded by

anil_shenoy
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
615 views

Basic Commands Worked On SOLARIS

The document provides commands to check system information on a Linux system such as hostname, architecture, uptime, logged in users, shell and more. It also shows the outputs of commands like date, cal, echo, man and yes. Key commands checked include uname, uptime, who, w, top, finger, cal, echo, man and history.

Uploaded by

anil_shenoy
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

echo hello world

• passwd
• date
• hostname
• arch
• uname -a
• dmesg | more (you may need to press q to quit)
• uptime
• who am i
• who
• id
• last
• finger
• w
• top (you may need to press q to quit). prstat on Solaris.
• echo $SHELL
• echo {con,pre}{sent,fer}{s,ed}
• man "automatic door"
• man ls (you may need to press q to quit)
• man who (you may need to press q to quit)
• who can tell me why i am created
• lost
• clear
• cal 2000
• cal 9 1752 (do you notice anything unusual?)
• bc -l (type quit or press Ctrl-d to quit)
• echo 5+4 | bc -l
• yes please (you may need to press Ctrl-c to quit)
• time sleep 5
• history

root@localhost ~]# echo hello world


hello world

[root@localhost ~]# passwd


Changing password for user root.
New UNIX password:

[root@localhost ~]# date


Thu Aug 12 15:49:32 IST 2010

[root@localhost ~]# hostname // show or set the system’s host name


localhost.localdomain

[root@localhost ~]# arch //prints machine architecture


i686
[root@localhost ~]# uname -a //print all system information
Linux localhost.localdomain 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009 i686 athlon
i386 GNU/Linux

[root@localhost ~]# dmesg|more


Displays system diagnostic messages as well as a list of devices attached to the system
since the most recent restart.

[root@localhost ~]# uptime //Tells how long the system has been running.
16:22:08 up 9:00, 2 users, load average: 0.23, 0.09, 0.02

[root@localhost ~]# who am i //shows who is logged on


root pts/1 2010-08-12 15:55 (:0.0)

[root@localhost ~]# who //all the users who have logged on


root :0 2010-08-12 07:24
root pts/1 2010-08-12 15:55 (:0.0)
root pts/2 2010-08-12 16:28 (:0.0)

[root@localhost ~]# id //print user identity


uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
context=root:system_r:unconfined_t:SystemLow-SystemHigh

[root@localhost ~]# last //show listing of last logged in users


root pts/2 :0.0 Thu Aug 12 16:28 still logged in
root pts/1 :0.0 Thu Aug 12 15:55 still logged in
root pts/4 :0.0 Thu Aug 12 13:13 - 15:54 (02:41)
root pts/3 :0.0 Thu Aug 12 12:57 - 15:11 (02:14)
...

[root@localhost ~]# finger //user information lookup program

[root@localhost ~]# w //Show who is logged on and what they are doing.
16:36:39 up 9:15, 3 users, load average: 0.00, 0.02, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root :0 - 07:24 ?xdm? 3:20 0.29s /usr/bin/gnome-session
root pts/1 :0.0 15:55 0.00s 0.03s 0.00s w
root pts/2 :0.0 16:28 50.00s 0.03s 0.00s man finger

[root@localhost ~]# echo $SHELL //echo - display a line of text ,here,displays the shell
/bin/bash

[root@localhost ~]# echo {con,pre}{sent,fer}{s,ed} //displays all possible words


consents consented confers confered presents presented prefers prefered

[root@localhost ~]# cal 2000 //year 2000 calendea\r

[root@localhost ~]# cal 9 1792


September 1792
Su Mo Tu We Th Fr Sa
1
2345678
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30

[root@localhost ~]# yes please //output please repeatedly until killed


please
please
please
please
...

[root@localhost ~]# time sleep 5 /give resource usage

real 0m5.003s
user 0m0.001s
sys 0m0.001s

[root@localhost ~]# history //GNU History Library

You might also like