Basic Linux commands part 2

This is the list of commonly used commands in systems administration.

hwclock Manage hardware clock.
netdate Set clock according to host’s clock.
rdate Manage time server.
zdump Print list of time zones.
zic Create time conversion information files.

Host Information
arch Print machine architecture.
dnsdomainname Print DNS domain name.
domainname Print NIS domain name.
free Print memory usage.
host Print host and zone information.
hostname Print or set hostname.
nslookup Query Internet domain name servers.
uname Print host information.

dip Establish dial-up IP connections.
gdc Administer gated routing daemon.
ifconfig Manage network interfaces.
ipchains Administer firewall facilities (2.2 kernel).
iptables Administer firewall facilities (2.4 kernel).
named Translate between domain names and IP addresses.
netstat Print network status.
portmap Map daemons to ports.
rarp Manage RARP table.
route Manage routing tables.
routed Dynamically keep routing tables up-to-date.
rpcinfo Report RPC information.
ruptime Check how long remote system has been up.
rwho Show who is logged in to remote system.
systat Show status of remote systems.
traceroute Trace network route to remote host.

Starting and Stopping the System
bootpd Internet Boot Protocol daemon.
bootpgw Internet Boot Protocol gateway.
bootptest Test bootpd.
halt Stop or shut down system.
init Change runlevel.
reboot Shut down, then reboot system.
runlevel Print system runlevel.
shutdown Shut down system.
telinit Change the current runlevel.
uptime Display uptimes of local machines.

System Activity and Process Management
fuser Identify processes using file or filesystem.
psupdate Update /boot/psupdate.
renice Change the priority of running processes.
top Show most CPU-intensive processes.

chpasswd Change multiple passwords.
groupadd Add a new group.
groupdel Delete a group
groupmod Modify groups.
grpck Check the integrity of group system files.
grpconv Convert group file to shadow group file.
lastlog Generate report of last user login times.
newusers Add new users in a batch.
pwck Check the integrity of password system files.
pwconv Convert password file to shadow passwords.
rusers Print who-style information on remote machines.
rwall Print a message to remote users.
useradd Add a new user.
userdel Delete a user and her home directory.
usermodModify a user’s information.
w List logged-in users.
wall Write to all users.
whoami Show how you are currently logged in.

Security and System Integrity
badblocks Search for bad blocks.
chroot Change root directory.

lpc Control line printer.
tunelp Tune the printer parameters.

File Systems Management
debugfs Debug extfs filesystem.
dosfsck Check and repair a DOS or VFAT filesystem.
dumpe2fs Print information about superblock and blocks group.
e2fsck Check and repair a second extended filesystem.
fdformat Format floppy disk.
fsck Check and repair filesystem.
fsck.minix Check and repair a MINIX filesystem.
fuser List processes using a filesystem.
mke2fs Make new second extended filesystem.
mkfs Make new filesystem.
mkfs.ext2 Another name for mke2fs.
mkfs.minix Make new MINIX filesystem.
mklost+found Make lost+found directory.
mkraid Set up a RAID device.
mkswap Designate swap space.
mount Mount a filesystem.
raidstart Activate a RAID device.
raidstop Turn off a RAID device.
rdev Describe or change values for root filesystem.
rootflags List or set flags to use in mounting root filesystem.
showmount List exported directories.
swapdev Display or set swap device information.
swapoff Cease using device for swapping.
swapon Begin using device for swapping.
sync Write filesystem buffers to disk.
tune2fs Manage second extended filesystem.
umount Unmount a filesystem.

fetchmail Retrieve mail from remote servers.
formail Convert input to mail format.
mailq Print a summary of the mail queue.
makemap Update sendmail’s database maps.
rmail Handle uucp mail.
sendmail Send and receive mail.

cpio Copy file archives.
install Copy files into locations providing user access and set permissions.
rdist Distribute files to remote systems.
tar Copy files to or restore files from an archive medium.

agetty Start user session at terminal.
arp Manage the ARP cache.
cardctl Control PCMCIA cards.
cardmgr PCMCIA card manager daemon.
cfdisk Maintain disk partitions (graphical interface).
fdisk Maintain disk partitions.
getty Start user session at terminal.
kbdrate Manage the keyboard’s repeat rate.
ramsize Print information about RAM disk.
setserial Set serial port information.
slattach Attach serial lines as network interfaces.

Managing the Kernel
depmod Create module dependency listing.
insmod Install new kernel module.
lsmod List kernel modules.
modprobe Load new module and its dependent modules.
rmmod Remove module.

cron Schedule commands for specific times.
dmesg Print bootup messages after the system is up.
ldconfig Update library links and do caching.
logger Send messages to the system logger.
logrotate Compress and rotate system logs.
rstat Display host’s system status.
run-parts Run all scripts in a directory.

About the author


View all posts

Leave a Reply