[Info] Useful sysadmin commands for Linux

 

Commands for hdd specs:

> lshw -class disk -class storage
> smartctl -i /dev/sda

 

Showing CPU information:

> hwinfo --cpu
> lscpu
> cat /proc/cpuinfo

 

Retrieving system / OS information:

> dmidecode -t system
> lsb_release -a

 

Restart network services:

> /etc/init.d/networking restart

 

Disk usage:

> du -sh "folder_name"

 

Advanced disk usage:

> ncdu "folder_name"

 

Watch a command output for changes

> watch 'command'

 

View live changes to a file:

> tail -f "file_name"

 

Obtain kernel config from currently running kernel:

> zcat /proc/config.gz > running.config
> cat /proc/config.gz | gunzip > running.config

 

Obtain kernel config from kernel image:

> extract-ikconfig <kernel-image>

The tool extract-ikconfig can be found in the kernel source under 'scripts' folder. On Gentoo, it is /usr/src/linux/scripts

 

 

 

References:

http://www.tecmint.com/useful-linux-commands-for-system-administrators/

http://www.tecmint.com/60-commands-of-linux-a-guide-from-newbies-to-system-administrator/

http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html

http://www.tldp.org/LDP/abs/html/system.html

http://computernetworkingnotes.com/linux-file-system-basic-commands/basic-linux-commands-part1.html

http://www.thegeekstuff.com/2010/12/50-unix-linux-sysadmin-tutorials/

http://www.thegeekstuff.com/2010/11/50-linux-commands/

https://www.getfilecloud.com/blog/2014/01/25-linux-commands-for-system-administrators/#.VsLDvvkrKqI

http://www.reallylinux.com/docs/admin.shtml

 

Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
MENU