I must admit, I'm a command line geek. Whenever I have the chance, regardless of desktop environment or distribution, I open a terminal and start fiddling something. This does not mean everyone must be like me, of course. If you're the person who is mouse and GUI-oriented, no problems. However, there are situations when all you have at your disposal for a while is the command line. One of those situations might be an upgrade of your kernel/graphics drivers that leave you high and dry until the bug is reported and the developers look at the issue. You have to send a very important e-mail or you have to check the evolution of prices of your favorite laptop. All the essential desktop tasks (with some exceptions, though) that you do on a GUI-enabled machine can be done on a CLI-only machine as well, so if you're interested...
The everyday tasks we will refer to are the ones we usually do in a usual day, be it a work day or a weekend. We need to check our mail, maybe watch something on Youtube (yes, it's possible), chat with our friends or simply browse away from URL to URL. These are the kinds of things we are talking about in this article. By the way, another huge advantage of the CLI approach is (besides efficiency and low resources) uniformity. You don't have to worry, if you use many Linux computers, that some of them won't have your favorite desktop installed: these programs we will tell you about work everywhere, GUI available or not, as long as you have a terminal emulator installed, of course. Note that this article is comprised only of ideas and suggestions, and will not guide you step-by-step on how to use the presented applications.
On Debian, when I wanted to do 'links -g', I got "Graphics not enabled when compiling (use links2 instead for graphics mode)". After installing it, typing
$ links2 -gRead more ...
/vardirectory has filled up and you are left with with no free disk space available. This is a typical scenario which can be easily fixed by mounting your
/vardirectory on different partition. Let's get started by attaching new storage, partitioning and creating a desired file system. The exact steps may vary and are not part of this config article. Once ready obtain partition UUID of your new var partition eg. /dev/sdc1:
# blkid | grep sdc1 /dev/sdc1: UUID="1de46881-1f49-440e-89dd-6c32592491a7" TYPE="ext4" PARTUUID="652a2fee-01"Create a new mount point and mount your new partition:
# mkdir /mnt/newvar # mount /dev/sdc1 /mnt/newvarRead more ...
/lib/systemd/system/docker.servicewith your favorite text editor and replace the following line where
/new/path/dockeris a location of your new chosen docker directory:
FROM: ExecStart=/usr/bin/docker daemon -H fd:// TO: ExecStart=/usr/bin/docker daemon -g /new/path/docker -H fd://Read more ...
Whether you're a home user or a system/network administrator at a large site, monitoring your system helps you in ways you possibly do not know yet. For example, you have important work-related documents on your laptop and one fine day, the hard drive decides to die on you without even saying goodbye. Since most users don't make backups, you'll have to call your boss and tell him the latest financial reports are gone. Not nice. But if you used a regularly started (at boot or with cron) disk monitoring and reporting piece of software, like smartd for example, it will tell you when your drive(s) start to become weary. Between us, though, a hard drive may decide to go belly up without warning, so backup your data.
Our article will deal with everything related to system monitoring, whether it's network, disk or temperature. This subject usually can form enough material for a book, but we will try to give you only the most important information in order to get you started, or, depending on experience, have all the info in one place. You are expected to know your hardware and have basic sysadmin skills, but regardless where you're coming from, you'll find something useful here.
Some "install-everything" distributions may have the package needed for you to monitor the system temperature already there. On other systems, you may need to install it. On Debian or a derivative you can simply do
# aptitude install lm-sensorsRead more ...
Here is a small tip on how to determine OS of the remote computer using nmap command. This can be quite handy if you are trying to create inventory list of your LAN hosts or you simply do not know what is running behind certain local or remote IP address and you need some hints. Using nmap for this kind of job does not mean that you will be able to identify remote OS with 100% accuracy but nmap will certainly provide you with some quite solid educated guess.
When trying to determine OS of the remote host using nmap, nmap will base its guess on various aspects such as open and closed ports of default OS installation, operating system fingerprints already submitted to nmap database by other users, MAC address etc.Read more ...
What you're reading is only the first of the many articles from the "Learning Linux commands" series. Why would we want to do such a thing? Because it's useful to you to have every option and possible use of a widely used command all in one place. You will find some options or even some commands that you didn't even knew existed, and your life as a Linux user / admin will become easier. If you're not afraid of opening a terminal and know the basics of using a Linux system, this article is for you.
We chose dd as the first contender in our series because it's a useful tool that has lots of options, as you will see. This makes it almost one of the Swiss army knives of the Linux world. Yeah, this term (Swiss army knife) is used more than it should be by the Linux-oriented article writers, so we couldn't pass the opportunity to use it ourselves.
Before we start we wanted to give you a general idea of how dd is used. First of all, the name comes from "data duplicator", but it's also jokingly said to stand for "disk destroyer" or "data destroyer" because it's a very powerful tool. So we recommend extra care when using dd because one moment of carelessness may cost you valuable data. The general syntax of a dd command is
# dd if=$input_data of=$output_data [options]
Input and output data can be disks, partitions, files, devices...mainly everything you can write to or read from. As you will see, you can use dd in a networked context to send data streams across your LAN, for example. You can have only the input part in your dd command, or only the output command, and you can even eliminate both in some cases. All these will be treated in the table below.
Join command is yet another example of text processing utility under GNU/Linux. Join command combines two files based on the matching content lines found in each file. Using join command is quite straight forward and if used currently and in the right situation it can save lots of time and effort. This article requires very basic command line experience.
Do you feel that someone is attempting to access you server? To find out, you can deploy a honeypot within your system to help you ease your paranoia by either confirming or dismissing your initial believe. As an example you can start the Kippo SSH honeypot, which allows you to monitor brute-force attempts, collect up today exploits and malware. Kippo also automatically records hacker's shell session, which you can replay to explore various hacking techniques and later use this gathered knowledge to harden your production server. Another reason why to install a honeypot is to take away an attention from your production server. In this tutorial we will show how to deploy a Kippo SSH honeypot on the Ubuntu server.
Kippo SSH honeypot is a python based application. Therefore, we need to first install python libraries:
$ sudo apt-get install python-twisted
Normally you would run you sshd service listening on default port 22. It makes sense to use this port for your SSH honeypot and thus if you already run the SSH service we need to change the default port to some other number. I would suggest not to use alternative port 2222 as its use is already generally known and it could sabotage your disguise. Let's pick some random 4-digit number like 4632. Open your SSH /etc/ssh/sshd_config configuration file and change the Port directive from:Read more ...
In this quick GNU R tutorial to statistical models and graphics we will provide a simple linear regression example and learn how to perform such basic statistical analysis of data. This analysis will be accompanied by graphical examples, which will take us closer to producing plots and charts with GNU R. If you are not familiar with using R at all please have a look at the prerequisite tutorial: A quick GNU R tutorial to basic operations, functions and data structures.
We understand a model in statistics as a concise description of data. Such presentation of data is usually exhibited with a mathematical formula. R has its own way to represent relationships between variables. For instance, the following relationship y=c0+c1x1+c2x2+...+cnxn+r is in R written as
which is a formula object.
Let us now provide a linear regression example for GNU R, which consists of two parts. In the first part of this example we will study a relationship between the financial index returns denominated in the US dollar and such returns denominated in the Canadian dollar. Additionally in the second part of the example we add one more variable to our analysis, which are returns of the index denominated in Euro.Read more ...
In the last two articles we have learned how to install and run GNU R on the Linux operating system. The purpose of this article is to provide a quick reference tutorial to GNU R that contains introduction to the main objects of the R programming language . We will learn about basic operations in R, functions and variables. Moreover, we will introduce R data structures, objects and classes.
Let us start with a simple mathematical example. Enter, for instance, addition of seven and three into your R console and press enter, as a result we obtain:
To explain in more detail what just happened and what is the terminology we use when running R, we say that the R interpreter printed an object returned by an expression entered into the R console. We should also mention that R interprets any number as a vector. Therefore, "" near our result means that the index of the first value displayed in the given row is one. This can be further clarified by defining a longer vector using the c() function. For example:Read more ...