Tag Archives: command

Linux Join Command Tutorial for Beginners (5 examples) by https://is.gd/cdkdNJ

Sometimes, you may want to combine two files in a way that the output makes even more sense.

If you are on Linux, and are looking for a tool that can help you in situations line these, you may want to check out join, which is a command line utility. In this tutorial, we will discuss this command using some easy to understand examples.

from https://is.gd/cdkdNJ

Selected by Galigio via Computer Borders

Simple Terminal Commands to check 32/64-bit Version and Installed RAM on Ubuntu Computer

linux-logo

Courtesy of nixpal.com

When you want to check if you have a 32-bit or a 64-bit Linux you can open a Terminal and just type:

file /sbin/init

or

arch

If you prefer to know how much about the RAM you installed on the PC, type:

free -m

or

grep MemTotal /proc/meminfo

for more detailed info you can try:

cat /proc/meminfo

or

grep MemTotal /proc/meminfo

if you prefer to monitor your RAM in real time.

screenshot-bin-bash1

Courtesy of validwebs.com

“Username is not in the sudoers file. This incident will be reported…” How to add a specific user to sudoers on Linux

Sooner or later, if you use Linux and you prefer Terminal to GUI you will stumble on this message:

Username is not in the sudoers file. This incident will be reported

The first thing to clarify is that the “incident” will never be reported outside your computer but in the auth.log file. But if you have previously configured your Linux OS to send these kind of logs to you by email, you receive an alert about.. your own activity with sudo…

In any case, to solve the above mentioned specific sudo matter, use Terminal and type:

sudo gedit /etc/sudoers

At this point the text file “sudoers” will be opened and you will be able to modify it using e.g. gedit.

Obviously you can use another text editor you prefer as, for example, nano. In this case the command will be:

sudo nano /etc/sudoers

Now you have to peer into the text and find the “#User privilege Specification” section and add the command:

your-username ALL=(ALL:ALL) ALL

where ALL=(ALL:ALL) ALL stands for: allow the specific user (your-username) to access all the terminals, as if he/she were any other user, and allow him/her to execute the full range of commands.

And you will obtain something similar to this:

# User privilege specification
root ALL=(ALL:ALL) ALL
your-username ALL=(ALL:ALL) ALL

Try it! (..if you need…)

——————-

References:

https://help.ubuntu.com/community/RootSudo

Terminate unresponsive programs on Ubuntu

Xkill is part of the X11 utilities pre-installed in Ubuntu and a tool for terminating misbehaving X clients or unresponsive programs. You can easily add a shortcut key to launch xkill with the steps below:
– Go to System > Preferences > Keyboard Shortcuts.
– Click the Add button to create a custom shortcut.
– Enter xkill to both the Name and Command boxes and click the Apply button.
– Click on Disabled at the xkill row in the Keyboard Shortcuts window (Disabled is then changed to New shortcut…).
– Press a new key combination, e.g. Ctrl+Alt+X (New shortcut… is then changed to Ctrl+Alt+X).
– Click the Close button.
Xkill is ready for use. Press the above key combination to turn the cursor to an X-sign, move the X-sign and drop it into a program interface to terminate the unresponsive program, or cancel the X-sign with a right-click. AddThis

Create ‘alias’ (shortcuts to commands) using Linux Sophisticated Commands

Long sophisticated instructions are usually not solely tough to recollect but in addition  take a lot of time to be typed. When it’s a must to use them on day by day foundation, you turn into annoyed when typing them repeatedly and again… So, ‘alias’ are extra appropriate for lengthy and complex commands.

Let’s think about an example.

To find the top 10 largest files in your system, you can set the next ‘alias’:

alias top10files=”find . -type f -exec ls -sh {} \; | sort -n -r | head -10”

You can even combine different instructions with ‘alias’.  As an illustration, if you happen to often use ‘tail’ and direct its output to file to later view that file, you may set a very simple ‘alias’ to do this cumbersome operation in 1 word:

alias Tail=”tail /var/log/messages > hello.txt;cat hello.txt”

Now just enter ‘Tail’ and voila! All is done at once.

You need to use any file with tail and direct its output and you’ll even use ‘nano’ or ‘vi’ to view/edit its output.

Here’s one other example… ‘alias’ to connect to a remote server:

alias any_name=”ssh -l -p ”

You possibly can even create ‘alias’ on your bash scripts, like:

alias clc=”sh /home/user/myscripts/calc.sh”

Now that you have set a number of totally different ‘alias’  you may want to test that which ‘alias’ are set in your system.  To do that, simply difficulty the next command:

alias

and it will list all the set ‘alias’ you have.

To remove an ‘alias’, just issue the ‘unalias’ command, like:

unalias Google

and now typing Google in Terminal will do nothing (as it was set with lynx).

To remove all the ‘alias’, issue the following command and all the ‘alias’ are gone:

unalias -a

We have mentioned the way in which of setting the ‘alias’ for different sorts of commands.  However setting ‘alias’ in this approach be temporary.  While you reboot you PC, all the ‘alias’ which you will have set will probably be gone.  This does not mean that it’s a must to set all of the ‘alias’ each time you boot your PC.  You probably have set an ‘alias’ and you favored it a lot that you really want it to completely reside in you PC, simply add this alias in ‘.bashrc’ file in you dwelling directory. For example, if you would like ‘alias’:

Set up <software_name>

to permanently reside in your PC then user your favorite text editor and add the following line in your ‘~/.bashrc’ file:

alias Install=”sudo apt-get install”

Now this ‘alias’ will not vanish into thin air when you reboot your PC. Only those ‘alias’  which are listed in ‘~/.bashrc’ file will be permanent.

This information is just a preview about ‘alias’.  It’s just about primary ways of using ‘alias’ to make your life simpler.  ‘GNU alias’ is a instrument which can simplify your life immensely.  But sadly this device isn’t given the attention it deserves.  Briefly, it is such a strong tool that when you give it proper time, it could possibly make you overlook typing. AddThis mp3 link

How to freely annotate, typewrite and draw your pdf files: Foxit Reader 2.3!

More or less two years ago, at the very beginning stage of this blog, we wrote a post about Foxit Reader, a freeware software which allows you to read pdf files without using Acrobat reader or other proprietary programs. Today, in our Freeware Page, we have written a simple but effective post about the new features contained in Foxit Reader 2.3, the new updated version of this wonderful software. First of all it is necessary to focus on the new features contained in the Tools menu which allow you to typewrite, draw or commenting your pdf files even if they are locked by their authors. Using Foxit Reader you can actually personalize your pdf documents adding notes and -de facto- improving their value for your own goals. Please, do not forgive to save an extra copy of your original pdf files if you do not want to delete all the comments/drawings you have added. Moreover, the new version of Foxit Reader includes also a  player to watch or listen the multimedia elements coming with pdf files. Last but not least, in my experience Foxit Reader 2.3 contains more features and it is simpler to use than its Ubuntu competitor PDF Editor. A freeware to try! AddThis mp3 link