Linux_Commands
Linux_Commands
Command Description
pwd print working directory, i.e. display the name of my current
directory on the screen
hostname Print the name of the local host (the machine on which
you are working). Use netconf ( as root) to change the name
of machine
whoami Print my login name
id username print user id(uid) and his/her group id(gid), effective id (if
different than the real id) and the supplementary group
date Print or change the Operating system date and time. E.g. ,
change the date and time to 2004-11—20 23:57 using this
command
date 112023572004
To set the hardware clock from the system clock, use the
command (as root) setclock
time Determine the amount of time that it takes for a process,
to complete + other info. Don’t confuse it with date
command. E.g. I can find out how long it takes to display
a directory contents using :
time ls
who Determine the users logged on the machine
rwho –a Determine the users logged on your network. The rwho
services must be enabled for this command to run if it isn’t
, run setup as root to enable “rwho”
finger user_name System info about a user. Try : finger root
last shows listing of users last logged –in on your system
uptime Amount of time since last reboot
ps Print status. List the processes currently run by the
current user.
ps axu |more List the process currently running, even those without the
controlling terminal, together with the name of the user
that owns each process.
Networking commands:
ping machine name Check if you can contact another machine (give the
machine’s name or IP), press <Ctrl> C when done.
route –n Show the routing table.
ifconfig <as root) Display info on the network interfaces currently
active. (Athernet, ppp, etc). Your first Ethernet shows up
as eth0, second eth1, etc. first ppp over modems as ppp0,
second ppp1, etc. the “lo” is the”loopback only” interface
which should be always active. Use the option (see
ifconfig help) to configure the interfaces.
netstat |more Display a lot (too much?) info rmation on the status of your
network.
Compile By
Abdul Khalique, Karachi
bc020200605@vu.edu.pk