Monday, June 12, 2017

Find Installed Repositories From Commandline In Linux

use this command to find the installed repositories in your DEB based system like Debian, Ubuntu, Linux Mint etc.
sudo grep -Erh ^deb /etc/apt/sources.list*

Run the following command to view the list of installed packages in DEB based systems
sudo apt-cache policy

Sunday, June 4, 2017

Install YouTube-DL on Linux (a tool to download videos from dailymotion, youtube etc)

We can easily install YouTube-DL on all the Linux distribution such as Debian, RHEL, Ubuntu, LinuxMint, CentOS, Fedora, suse, openSUSE, ArchLinux, Manjaro, Mageia, etc..,. by using below method.

[Download through curl]
# curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl

or

[Download through wget]
# wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

[Set Executable permission]
# chmod a+rx /usr/local/bin/youtube-dl

[Upgrade to latest version]
# youtube-dl -U
How to use youtube-dl to download videos

[Syntax]
# youtube-dl [Video URL]

[example]
# youtube-dl https://www.youtube.com/watch?v=SjiwQxbol7I

[Sample video downloading from YouTube]
# youtube-dl https://www.youtube.com/watch?v=SjiwQxbol7I
[youtube] SjiwQxbol7I: Downloading webpage
[youtube] SjiwQxbol7I: Extracting video information
[download] Destination: Linux _ Unix - Find Out DNS IP Addresss Settings Tutorial-SjiwQxbol7I.f136.mp4
[download] 100% of 16.10MiB in 00:13
[download] Destination: Linux _ Unix - Find Out DNS IP Addresss Settings Tutorial-SjiwQxbol7I.f140.m4a
[download] 100% of 2.55MiB in 00:02
[ffmpeg] Merging formats into "Linux _ Unix - Find Out DNS IP Addresss Settings Tutorial-SjiwQxbol7I.mp4"
Deleting original file Linux _ Unix - Find Out DNS IP Addresss Settings Tutorial-SjiwQxbol7I.f136.mp4 (pass -k to keep)
Deleting original file Linux _ Unix - Find Out DNS IP Addresss Settings Tutorial-SjiwQxbol7I.f140.m4a (pass -k to keep)