How to install Betty - command line virtual assistant tool
To install Betty command line virtual assistant in Linux
Betty is command line virtual assistant tool that is similar to Google Now Assistant service in Android Mobile devices. It translates the simple English into commands. By using this you can also perform some task from a Linux system’ s without knowing any type of commands.Using this tool we will perform almost all task like configurations, locating files, downloading from internet. Installation of Betty command line virtual assistant in Linux is explained in this article.
To install Betty
Run the following command to install the required packages.
root@linuxhelp:~# apt-get install ruby curl git -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
git-man libcurl3-gnutls liberror-perl libjs-jquery libruby2.1 libyaml-0-2 ruby2.1 rubygems-integration
Suggested packages:
git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn javascript-common ri ruby-dev bundler
.
.
.
Setting up libjs-jquery (1.7.2+dfsg-3ubuntu2) ...
Setting up rubygems-integration (1.9) ...
Setting up libruby2.1:amd64 (2.1.5-4ubuntu1) ...
Setting up ruby2.1 (2.1.5-4ubuntu1) ...
Setting up ruby (1:2.1.5.1ubuntu1) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Then clone betty from github, by running the following command.
root@linuxhelp:~# git clone https://github.com/pickhardt/betty
Cloning into ' betty' ...
remote: Counting objects: 1090, done.
remote: Total 1090 (delta 0), reused 0 (delta 0), pack-reused 1090
Receiving objects: 100% (1090/1090), 623.34 KiB | 234.00 KiB/s, done.
Resolving deltas: 100% (630/630), done.
Checking connectivity... done.
Run the following command to start betty command.
root@linuxhelp:~# echo " alias betty=" ~/betty/main.rb" " > > ~/.bashrc & & source ~/.bashrc
To view the user name
Betty is ready to use. Now lets try to get the username.
root@linuxhelp:~# betty whats my username
Betty: Running whoami
Root
To check for the IP address
Utilize the following command to verify the IP address.
root@linuxhelp:~# betty whats my ip
Betty: Okay, I have multiple ways to respond.
Betty: Enter the number of the command you want me to run, or N (no) if you don' t want me to run any.
[1] ifconfig
Gets your internal ip address.
[2] curl -sL http://pannous.net/ip.php
Gets your external ip address.
1
Betty: Running ifconfig
eno16777736 Link encap:Ethernet HWaddr 00:0c:29:3a:c0:e5
inet addr:192.168.5.222 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe3a:c0e5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7756 errors:0 dropped:0 overruns:0 frame:0
TX packets:4635 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10351874 (10.3 MB) TX bytes:352473 (352.4 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:302 errors:0 dropped:0 overruns:0 frame:0
TX packets:302 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:43198 (43.1 KB) TX bytes:43198 (43.1 KB)
To know the current working directory
Run the following command to check the current working directory.
root@linuxhelp:~# betty where am i
Betty: Running pwd
/home/user1
To check for kernel version
Run the following command to verify the kernel version.
root@linuxhelp:~# betty whats my kernel version
Betty: Running uname -a
Linux linuxhelp 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
To check for time and date
Run the following command to check the time and date
root@linuxhelp:~# betty whats time
Betty: Running date +" %r (%T)"
06:26:26 PM IST (18:26:26)
root@linuxhelp:~# betty whats date
Betty: Running date +" %a %d %b, %Y"
Tue 16 Aug, 2016
To surf internet, just turn on the betty’ s web mode.
root@linuxhelp:~# betty turn web on
Betty: Web queries ON
To count the number of lines in a text file
root@linuxhelp:~# ls
betty Desktop Documents Downloads examples.desktop Music Pictures Public Templates test Videos
root@linuxhelp:~# betty count lines in test
Betty: Running find test -type f -exec wc -l {} | awk ' {total += $1} END {print total}'
38
We can ask betty’ s name.
root@linuxhelp:~# betty whats your name
Betty: My name is Betty.
Comments ( 0 )
No comments available