Q: How to find and replace a string in Nano?
A: The answer is straightforward, while you are in Nano,
- Press Ctrl+\. Notice that a box appears in the bottom of the window
- Then type the string you are trying to find and press Enter
- Then type the string you want to replace and press Enter
- At this point Nano jumps to the first instance of what you are looking for and shows you a set of shortcuts to go and find one by one, by pressing y for accepting and n for skipping, or replace all by pressing a
Continue reading Find and replace in Nano
Q: How to search in Ubuntu application repository?
A: There are several ways to search in Ubuntu application repository but the easiest way is as follows:
Continue reading Search in Ubuntu application repository
There are still some companies out there that are trying to have a GUI (Graphical User Interface) for their web services specially in scientific society. Most of these application are written in Java and requires user to have a Java enabled machine to run on. All these companies support OSX and Windows but they don’t want to provide support for Linux (for some reason that is not clear for me!). So in this brief tutorial I’m going to answer the question in an easy way:
The question is, how should we run .jlnp file on Linux?
Continue reading Run Java applications on Linux
I had an issue with my Ubuntu recently that the computer was not stopping screesaver and didn’t show me the login page after a screenlock. Most people usually try to forcefully shutdown by pressing and holding the power button for about 10 seconds. This is not a good choice specially when you have some services on that machine or having some other users logged in through SSH to that computer.
In this article I will briefly explain how to logout a specific user remotely through SSH without touching or terminating any service or any other user.
Continue reading Remote logout user through SSH
It has always been a great concern to keep track of folder permissions since most of the lame errors in Linux are due to a permission denial by the system, and sysadmins should change some permissions from time to time to fix things. At this point having a good record of what has been changed is vital since in terminal there is no undo or Ctrl+z and you should keep track of what you are doing to reverse the change and correct the mistakes.
In this post I briefly want to present some lines of code that can help you keep track.
Continue reading Save file/folder structure including permissions
The first few sentences are just my personal experience, so you can skip it and move on to the next part (Starting the configurations).
Some small complains about Ubuntu 14.04 LTS !
I Started using KDE for my Ubuntu system (since Unity was causing lot’s of system crash and reboots). Everything about KDE is OK and smooth, with 32GB RAM and Intel core i7 vPro 3.4GHz 8MB, and I’m having lots of fun working around and it increases my productivity, but I also missed the spotlight search of my MacBook. also KDE does not have good shortcuts for their plasma system and for example you can not use a windows key on your keyboard to open the application launcher! so I tried to find an easy way not to use mouse for opening my application. So here is a way to have spotlight search in KDE:
Start the configuration
Before everything I should say that I’m not going to install any application or write some weird shell, I’m going to sue the KDE settings in few clicks.
So let’s get to business:
Continue reading Have spotlight search in KDE
I was setting up a service on a local computer with Ubuntu 14.04 Trusty Tahr OS which I realized there is no SSH server daemon what so ever on Ubuntu, so I thought installation and enabling SSH in Ubuntu 14.04 can be a issue for some beginners, so here is the solution:
First you should install the OpenSSH server:
sudo apt-get install openssh-server
Continue reading Install and enable SSH in Ubuntu 14.04
There is an annoying error which you get when you want to connect to the same IP via SSH but the server authentication key has been changed and you computer does not accept the risk to connect with a key other than the one you have used before.
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending key in /home/user/.ssh/known_hosts:1
RSA host key for ras.mydomain.com has changed and you have requested strict checking.
Host key verification failed.
This can happen when you install a new OS on the server (or what ever you are trying to connect with via SSH) or if you have completely change the device on the other end (which is also the same case as changing the OS). This error is basically for your own security and safety but it annoys anyway 😀
In this article i’m going to explain few ways to resolve the issue:
Continue reading SSH “Host key verification failed” error
I had this issue for my Ubuntu and Pidora, so in this article you can have both solutions:
The problem I had was to add a user on an Ubuntu 14.04 at my work, so that someone else from the company can help me do some basic maintenance of the system (it was requested by my employee!), so this is how I did it after creating a user (new_user):
gpasswd -a new_user sudo
This command will add the user new_user to the group sudo.
I was working with Pidora (which is a Fedora remix for Raspberry Pi) and I was about to run a command using sudo that I faced the following error:
[NixSOS@pidora ~]$ sudo iptables -L -n
[sudo] password for NixSOS:
NixSOS is not in the sudoers file. This incident will be reported.
and I was confused for a while and then I searched for a way to add my user in the “sudoers file” and I’m going to explain how to add a user or a group to sudoers file. This should work all major linux distributions.
Continue reading Add user or group to sudoers file
There are several places where you need to map a network drive to your computer, for example when you are in a company network and you want to have the shared network drive of your company domain on your computer. The term “mapping” is a technical term for mounting or loading a network drive to a computer.
For this purpose there are more than one way to do it and map the network drive to your Mac OSX and in this article I’m explaining two of those ways which are easier, faster and safer, one from Finder window and the other one from Terminal.
Continue reading Map a network drive in Mac OSX