CentOS Basic Usage

After a long time using Ubuntu, I find Ubuntu interesting, easy to use, and convenient to programming Ruby on Rails. However, talking about Linux, I think CentOS is also the big candidate that should be mentioned and tried. Today, I want to summary some basic usages relating to CentOS only before starting to use it. I will update this post continuously during my usage of CentOS.

  • check your CentOS version

    cat /etc/redhat-release
    
  • Update repository

    yum update
    
  • List package name

    yum list 
    
  • Install package by console

    yum install 
    
  • Remove package

    yum remmove 
    
  • Know which version of application installed

    yum list installed | grep name_of_app
    
  • Install Ruby on CentOS via RVM

    yum groupinstall -y development
    
    curl -L get.rvm.io | bash -s stable
    source /etc/profile.d/rvm.sh
    
    rvm reload
    rvm install 2.1.0 
    
    ruby --version
    rvm list rubies
    rvm use 2.1.0 --default
    
    

Published by

Colin Dao

I am a hardworking Rubyist in Hanoi, Vietnam

Leave a comment