FTP Clients for using on Ubuntu

For testing FTP server connection from Ubuntu command line, we can use following command, $ ftp my_ftp_server_IPConnected to my_ftp_server_IP220———- Welcome to Pure-FTPd [privsep] [TLS] ———-220-You are user number 4 of 50 allowed.220-Local time is now 14:37. Server port: 21.220-This is a private system – No anonymous login220-IPv6 connections are also welcome on this server.220 You … Read more

How to disable and / or enable ICMP ping from Linux host ?

To disable the ICMP ping from certain linux host, lets say which has IP of use below command, Type below command on the console of linux PC on which you are trying to enable / disable the ping. $ sudo iptables -A INPUT -p icmp –icmp-type any -j REJECT $ sudo iptables -A OUTPUT … Read more

How to rename part of a filename and replace the string in those files

If we want to rename only certain part of the filename, for example, we want to change a filename “memory_map.c” to “memory_mapping.c” i.e. we just want to rename “map” to “mapping” of the file, we  can use following command, $ ls -al memory_map.c -rw-rw-r– 1 user user 642 Aug 19 22:53 memory_map.c $ rename ‘s/map/mapping/’ … Read more

How to resolve dependencies generated during installation with “dpkg -i” ?

While I was trying to install chrome browser of a fresh installed ubuntu 14.04 with deb, it reported following error, $ sudo dpkg -i google-chrome-stable_current_amd64.deb dpkg: dependency problems prevent configuration of google-chrome-stable: google-chrome-stable depends on libappindicator1; however: Package libappindicator1 is not installed. dpkg: error processing package google-chrome-stable (–install): dependency problems – leaving unconfigured Errors were … Read more

Convert different video formats (AVI to mp4) using handbrake on Ubuntu

If you want to convert any AVI file to MP4 or compatible to be used in mobiles, you want to that on ubuntu using “HandBreak” and ffmpeg. First, make sure you have handbreak installed on ubuntu, if not you can use below commands to do that, $ sudo add-apt-repository ppa:stebbins/handbrake-releases These are the official HandBrake … Read more

How to Change Hostname for Ubuntu Machine ?

Recently, we wanted to change the hostname of our ubuntu 15.10 / 16.04 machine, $ lsb_release -a No LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 15.10Release: 15.10Codename: wily Lets, check now what is current hostname, $ hostname new-hostname So, its set to “new-hostname” Now, to change the hostname lets say “my-netbook”, user the command as, … Read more

How to resolve : getaddrinfo: new-hostname No address associated with hostname

Recently, we got the error “getaddrinfo: new-hostname No address associated with hostname” while working with some commands, This error means, we are missing somewhere an assignment of IP and its related hostname. You can use command “hostname”, To get, the hostname of your machine. $ hostname new-hostname Now, to assign an IP with this hostname … Read more

Linux commands to find files based on type, size etc.

Use below command for finding some files and searching text into those files, repalce DIR_TO_SEARCH with the proper path of directory you want to search in, Linux command for find and grep $ find DIR_TO_SEARCH -name ‘*.c’ -exec grep -i ‘main’ {} \; -print This command, finds all c files in DIR_TO_SEARCH directory and greps … Read more