(Linux Command Line) Part 1 – Linux Commands for Server Management and Monitoring


Linux is an open-source Operating System, normally used on servers as a result of it’s top solid, secured and loose. Linux is based mostly on Command Lines (Linux Commands), very similar to the former Microsoft DOS. Linux server management is moderately sophisticated, it calls for sure wisdom and reports.

Linux Command Line
Linux Command Line

Serial Linux Commands:

  >> Part 1 – Linux Commands for Server Management and Monitoring
  >> Part 2 – Linux Commands for File and Folder/ Directory Management
  >> Part three – Linux Commands for File Editor in Linux (CentOS, Ubuntu)
  >> Part four – Linux Commands for Network Configuration in Linux (CentOS, Ubuntu)
  >> Part five – Other Useful Linux Commands (CentOS, Ubuntu) you wish to have to grasp

In this serial articles of Linux Commands, I can summarize and classify the entire helpful Linux Command Lines into teams in an effort to simply perceive and use. There are some ways we will connect with a Linux Server by means of SSH from a terminal (to accomplish a Command Line), you’ll use Putty, OpenSSH …

Linux Commands Line for Server Management and Monitoring
Linux Commands Line for Server Management and Monitoring

Linux Commands for Server Management and Monitoring

Linux server management comprises many duties, reminiscent of: System Monitor (CPU reputation, reminiscence reputation, processes…), carrier control, person control, person roles (create customers, exchange passwords, permission …), reset server, run duties or time table activity …

Below tables are an important Command Line you wish to have to grasp to begin managing a Linux Server. Most command traces practice to each Ubuntu and CentOS

1. System data

  cat /proc/cpuinfo Check CPU data (collection of core, circle of relatives, dealer, clock velocity…)
  cat /proc/meminfo Check RAM utilization reputation – utilized by every job/ carrier
  cat /proc/model Check Linux Kernel model
  cat /proc/ioports Check I/O port data
  cat /and so forth/redhat-release Check Centos (and different Redhat) model
  uname -a Check Kernel data
  loose -m Check reminiscence (RAM and SWAP) utilization reputation – abstract
  init zero Shuttown the server (very similar to shutdown -h now or telinit zero)
  df -h Display device recordsdata and disk utilization reputation
  du -sh Display the capability of the present folder/ listing
  du -ah Display the capability of sub-folders and recordsdata within the present folder
  du -h –max-depth=1 Display the capability of direct kid sub-folders within the present folder
  df  Display the capability of onerous disks and all its walls
  lspci Display the mainboard data
  /sbin/ifconfig Display the IP configuration of the server
  hostname Display the hostname of the server
  finger [email protected] Collect information about the present person
  arch Check server’s architech
  cat /proc/swaps Check SWAP data (SWAP in Linux is similar to Virtual RAM in Windows)
  final reboot Check reboot historical past of the server

2. Linux Commands to shutdown, restart… Linux server

  logout Kill the present consultation
  reboot Restart the server
  shutdown -r now Restart the server (very similar to the command reboot)
  shutdown -h now Shutdown the server in an instant
  shutdown -h Nine:30 Shedule for shutting down the server (the server will shutdown at Nine:30)
  shutdown -c Cancel all scheduled shutdown instructions
  telinit zero Turn off the server (very similar to the command shutdown -h now)
  init zero Turn off the server (very similar to the command shutdown -h now ortelinit zero)
  go out Exit the present terminal window
  halt Turn off the server (an identical the command shutdown)
  sleep Pause/Sleep the device (very similar to Sleep in Windows)

three. Linux Commands for User control in Linux (CentOS, Ubuntu)

  passwd Change password (usual person can most effective exchange his password, whilst  root person can exchange the password of any person)
  pwck Check the syntax and information structure of person/password (/and so forth/passwd)
  useradd Create a brand new person, eg: useradd -c “New user 1” -g Group1
  userdel Delete a person
  usermod Change/ Edit/ Modify person data (organization, person title…)
  groupadd Create a brand new organization (organization person)
  groupdel Delete a gaggle
  groupmod Modify/ Edit organization data, eg: groupmod -n “old group name”  “new group name”
  who /w Display all logged in customers within the device
  uname Display device title (host)
  identification Display person identification (person identity quantity)
  logname Display present logged in person title
  su Login the device with different person (very similar to Secondary Logon function in Windows)
  teams Display all teams that the present person belongs to
  #vi /and so forth/passwd Display record customers
  #vi /and so forth/organization Display record teams
  chmod [file,folder]  Set permission for document/ folder (most effective the document/ folder proprietor can carry out this command)
  chown person [file, folder] Set/ Change the landlord for document/ folder
  chgrp organization [filefolder] Set/ Change the owner-group for document/ folder

four. Linux Commands for Service and Process control in Linux (CentOS, Ubuntu)

  best Similar to Task Manager in Windows, it’s going to show the entire data/ reputation of the device useful resource (processes, services and products, moderate load). Command best -d will can help you set a refresh period
  playstation -u username Display processes carried out via a person
  playstation -U root Display all processes except for device processes
  playstation –A Display all working processes
  ss Display all connecting/ open sockets
  ss -l Display all open ports
  w username Check the logged in person, login historical past, processes working via this person
  vmstat three Control behaviors of the device, and device data
  playstation Displays the entire present working program
  uptime Display the uptime and cargo moderate of the device
  rpm Check, uninstall or set up a .RPM package deal
  yum Install a packaged program (like rpm)
  wget Download from a URL
  sh Run an .SH program
  startx Start xwindows mode from a terminal window
  yum replace –y  Update Linux (CentOS)
  forestall/get started/restart Stop/ Start or Restart a carrier or a program, eg: service mysql forestall or /and so forth/init.d/mysqld get started
  kill Kill a proccess (the super-user can kill all processes, usual customers can kill most effective processes run via the person)
  kill PID or %process  Stop/ Kill a job via the ID (Process Identification Number) or process quantity
  pstree Display all processes in a process-tree
  carrier –status-all Check the entire carrier reputation
  whereis mysql Display the positioning that the carrier is put in (eg: MySQL)
  carrier –status-all |     grep abc Check the reputation of a selected job
  kill -Nine PID Force shut a job via job ID
  kill -1 PID Force shut a job ID then re-load the default config of the method

five. Other Usefull Linux Commands for Server Management

  transparent Clear the command window (an identical CLS in MS-DOS)
  hwclock Fix BIOS calendar
  cal Display device calendar
  date Display date, time of the device
  date –s “27 SEP 2011 14:26:00” Set device date-time via a string
  date +%Ypercentmpercentd -s “20130318″ Set device date via a string (time does now not exchange)
  date +%T -s “00:29:00″ Set device time via a string (date does now not exchange)

If you wish to have any more lend a hand, be happy to touch us via leaving a remark

Don’t disregard to practice us on social channels to get newest guidelines.


Changer.com - Instant Exchanger