Write shell scripts
to show the following
( you can write
menu driven programs)
Currently logged
user and his logname
( logname, id -un, echo $USER)
( logname, id -un, echo $USER)
Your current
shell ( echo $SHELL)
Your home
directory ( echo $HOME)
Your operating
system type (echo $OSTYPE)
Your current path
setting ( echo $PATH)
Your current
working directory ( echo $PWD )
Show Currently
logged users ( w or who -H)
Show only the user name of logged users in
the host ( users)
Details of last login ( last
mec ;where mec is the user id )
About your OS and
version, release number, kernel version
(
uname -a or cat /proc/version)
Show all
available shells ( cat /etc/shells )
Show mouse
settings (cat
/sys/class/input/mouse*/device/name )
Show computer CPU
information
CPU details ( cat /proc/cpuinfo | more )
Show information on CPU architecture ( lscpu)
Number of Processor core ( nproc)
Show memory
information
Memory details ( cat /proc/meminfo |
more )
Display file system disk usage ( df -h
)
Display the amount of free and used
memory ( free)
Virtual memory statistics ( vmstat)
File system
Mounted ( findmnt or cat /proc/mounts)
Note: There are
some advanced command like lshw which will list complete hardware
details. These commands can be run as
administrator user ( root) as sudo lshw ( needs root user password). Bring
your own laptop if possible.
Comments
Post a Comment