HostOnNet Blog

Category Archives: Linux

sar

sar No such file or directory sar is a tool to collect, report and store system activity information, a very useful tool to debug server performance related problems. To install sar on CentOS/RHEL, run To view memory stats, run To


Making POST request with curl

curl use socks5 proxy For an API request, i need to sent POST request with following data. POST https://api.ctl.io/v2/authentication/login Content-Type: application/json { “username”:”demouser1″, “password”:”mypassword” } This can be done with following curl command Here –request POST tell curl to use


Remove a servers key fingerprint from known_hosts

I was creating a program that login to remove server using PHP and run some commands. The servers key fingerprint was already on my known_hosts file. To verify script still work with out the fingerprint in known_hosts, i want to


Add IP in CentOS Server via Command Line

I installed CentOS 7 on a Hyper-V server. I want to manually assign IP to the server. This is done by editing file The file name vary depending on the network interface you have. Instead of editing the file via


Installing PowerShell On Ubuntu

Microsoft have recently Open Sourced PowerShell and made it available for Linux and Mac. https://github.com/PowerShell/PowerShell To Install powershell on Ubuntu, go to https://github.com/PowerShell/PowerShell/releases Download latest release. To install PowerShell v6.0.0-alpha.17 Release, run Bit install fails with some warning, i have


Alpine Linux – Tiny Linux Distribution

Alpine Linux is a tiny linux distribution based on busybox. System details are / # cat /etc/*release 3.5.2 NAME=”Alpine Linux” ID=alpine VERSION_ID=3.5.2 PRETTY_NAME=”Alpine Linux v3.5″ HOME_URL=”http://alpinelinux.org” BUG_REPORT_URL=”http://bugs.alpinelinux.org” / # uname -r 4.9.0-2-amd64 / # Total size of file system is


Debian

Installing Docker on Debian 9 Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. https://www.debian.org/ Latest version of Debian is 8, code named


SSH publickey authentication not working

On a CentOS 6.8 server i added my SSH public key. When i login, it keep asking me the password. I enabled debug message with Still don’t see any useful info to debug. It just ended up with debug1: Authentications


DirectAdmin Hosting Control Panel

DirectAdmin is a Hosting Control Panel for linux and FreeBSD servers. https://directadmin.com/ Common Urls Direct Admin http://server-ip:2222/ Webmail http://server-ip/roundcube Find MySQL password in DirectAdmin Server Apache configuration Apache configs are stored in folder /etc/httpd/conf/ Some of the config files are


Finding Disk Usage with du

du is a command line tool used to check disk space usage in a directory. -h will show directory size in human readable format, default is byte. You can use -k for size in KB. -x Only show disk usage