Linux.com

Community Blogs



A Bash Script to Install/Upgrade to Linux Kernel 3.16.3 in Ubuntu/Linux Mint

The Linux Kernel 3.16.3 is now available for the users, announced Linus Torvalds. This Linux Kernel version comes with plenty of fixes and improvements. The following BASH script, when executed, despite of the system architecture (valid only for i386, i686 and x86_64 based systems), installs Linux kernel 3.16.3 in your Linux systems.

Read more at YourOwnLinux

 

Scripting made fun

I have never been a fan of programming or scripting. Thought is was a skill I was unable to learn. When learning to administer a Linux system, scripting can not be avoided.

One of the skills every sysAdmin must learn is scripting. The benefit of scripting is to automate a task or job that is constantly run every time a system is running. A sysAdmin can make that job run on its own and concentrate on other tasks that are not so easily automated. These scripts are either written using a text editor, the shell, or, scripting language.

I was not automating anything, just getting used to writing scripts. When I was studying "Linux essentials" in preparation for the Linux certification, I was practicing passing variable values. That is, printing the value of one of my system's default variables. I had a crazy thought. What if I actually ran a script using a variable. I soon learned, Linux is what you make of it.

There are default variables already set on a Linux system. To find what these variables are, you simply type this command in a shell or terminal emulator, “printenv”

This is a screen shot of the default variables on my Linux Mint 17 system.

XDG_VTNR=7

SSH_AGENT_PID=1808

XDG_SESSION_ID=c1

TERM=xterm

SHELL=/bin/bash

XDG_SESSION_COOKIE=9f6e6efa3c8a79091dbec7c85403e053-1410643266.227255-1746036259

WINDOWID=35651588

GNOME_KEYRING_CONTROL=/run/user/1000/keyring-ccaIQh

USER=x

LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:

OPENDVD=eject /dev/sr0

SSH_AUTH_SOCK=/x

PLAYMEDIA=vlc /dev/sr0

SESSION_MANAGER=x

USERNAME=x

DEFAULTS_PATH=/usr/share/gconf/default.default.path

XDG_CONFIG_DIRS=/etc/xdg/xdg-default:/etc/xdg

PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

DESKTOP_SESSION=default

GDM_XSERVER_LOCATION=local

PWD=/etc

GNOME_KEYRING_PID=1585

LANG=en_US.UTF-8

MANDATORY_PATH=/usr/share/gconf/default.mandatory.path

MDM_XSERVER_LOCATION=local

GDMSESSION=default

SHLVL=1

XDG_SEAT=seat0

HOME=/x/x

XDG_SESSION_DESKTOP=default

LOGNAME=x

XDG_DATA_DIRS=/usr/share/default:/usr/share/xfce4:/usr/local/share/:/usr/share/:/usr/share/mdm/

DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ONZKNCkspd,guid=10fed374626ed9dae74c359c5414b544

MDMSESSION=default

TEXTDOMAIN=im-config

WINDOWPATH=7

XDG_RUNTIME_DIR=/run/user/1000

DISPLAY=:0.0

MDM_LANG=en_US.UTF-8

TEXTDOMAINDIR=/usr/share/locale/

COLORTERM=xfce4-terminal

XAUTHORITY=/x/x/x

_=/usr/bin/printenv

Take a close look at the bold text above. These are my custom variables I set to run some custom scripts.

OPENDVD=eject /dev/sr0 is used to open my laptop's DVD disc drive.

PLAYMEDIA=vlc /dev/sr0 is used to play a DVD using VLC.

Of course I could have just written the scripts using a text editor. I wanted to make things more interesting by try something different. Also, doing this helped me learn and appreciate environmental variables much more. I find them really fun to play with.

Always remember this syntax, "command argument". The command is what you want to run, the argument is what you want it to run on. The command “VLC” opens the VLC media player program. The argument “/dev/sr0” is the DVD disc drive I want it to open. Typing this in your terminal will do just that.

If you look at the subfolder “etc”, you will notice a file named “environment”. You can actually use this filie to create and store your own custom declared variables. On some Ubuntu based systems, you might noticed the default “PATH” variable is also located there. A little F.Y.I.

Once you set your desired variable, and save the file, restart your system. Run the “printenv” command and you will see your variables listed.

To set a variable, type in all caps, the name of the variable, then after that, the “=” sign and then the value that the variable will relate to. Like this, VARIABLE=value. In my case I typed, OPENDVD=”eject /dev/sr0”. The quotes surrounding the command indicates that the command should be treated as one value.

Once this is written, I had reset my mint system. Once logged in, and the terminal was opened, I called the value of the new variable. This is when you tell your terminal to print the value of a variable. The command to do this is, prompt<$VARIABLENAME>.When I typed, “$OPENDVD”, my dvd disc drive opens. Your system will recognize a variable when it starts with a dollar sign followed by a name in all caps as in, "$OPENDVD".

I was not big on programming. Yet, scripting, using variables, not only makes Linux even more interesting but programming as well. I already have a large list of scripts I want to experiment with. When I think about it, scripting might actually be my thing. I went beyond just learning what a variable is. I begun learning how to talk to Linux using my own language.

 

Make Downloading Files Effortless

A download manager is computer software that is dedicated to the task of downloading files, optimizing bandwidth usage, and operating in a more organized way. Some web browsers, such as Firefox, include a download manager as a feature, but their implementation lacks the sophistication of a dedicated download manager (or add-ons for the web browser), without using bandwidth optimally, and without good file management features.

<A HREF="http://www.linuxlinks.com/article/20140913062041384/DownloadManagers.html">Complete article</A>

 

Install Git 2.1.0 on Ubuntu 14.04, 12.04 and LinuxMint 16/15

Git has released 2.1.0 version on Aug 15, 2014. Git is a free and open source distributed version control system . Git 2.1 comes with the number of noticeable changes than 1.9 versions. It is designed to handle a small to very large projects with speed and efficiency.


Read more at  http://tecadmin.net/install-git-on-ubuntu/

 

THE TRUTH ABOUT – HOW TO SECURELY ERASE A SOLID STATE DRIVE (SSD)

The short answer is:

Perhaps you can’t. Well, you can, but that means that you need to use a hammer.

The long answer:

You could use the build in ATA Secure Erase command (if your drive supports that), or you can overwrite the SSD multiple times, but

There are studies out there showing that the data could be recovered even after overwriting multiple times.

Read on over here...

 

Powerful Command-line File Transfer Programs

This article provides my pick of the best open source command line file transfer programs. The software featured here supports a number of different protocols. They offer shell-like command syntax, and are great for scripting purposes.

<A HREF="http://www.linuxlinks.com/article/20140825031841844/FileTransfer.html">Read article</A>

 

SAR Command for Linux System Performance Monitoring

System Activity Report, also known as sar, is one of the most important utility for Linux system administrators when it comes to performance monitoring of a Linux system. sar provides an overview of the Linux system with various crucial metrics which include Processor, Memory, I/O Devices and Network related information. With sar, one can gather and store the information whenever there is an issue with the Linux server, and then use this data in order to deal with similar issue in future by comparing these system statistics with the ones at that point of time. In brief, historical analysis can be made a lot easier, when sar is used.

With sar, one can get information regarding following metrics:

  • Overall CPU Utilization
  • Individual CPU Utilization
  • Memory Utilization
  • Swap Utilization
  • Block Device Statistics
  • I/O Related Details
  • System Buffer and Context Switch Related Information
  • Network Related Statistics
  • Memory Allocation

Read more at YourOwnLinux

 

Linux emergency booting mode and init=/bin/sh

  • Acceder a grub, desplazarse a la línea del kernel que se quiere arrancar. Pulsar "a" (append). Añadir "init=/bin/sh"
  • Cambiar ro por rw, para evitar tener que remontar después /

kernel [...] rw root=/dev/mapper/VolGroup-lv_root [...] rd_LVM_LV=VolGroup/lv_root rd_NO_DM rhgb quiet init=/bin/sh

  • Pulsar INTRO para que arranque el sistema con el kernel que hemos modificado las opciones.
  • Una vez accedemos al sistema (y tenemos / en modo rw), arrancar el demonio udev:

sh-4.1# /sbin/udevd -d

  • Activar los LV's del VG que queremos:

sh-4.1# lvchange -ay system_vg

  • Para reiniciar la máquina, ejecutar:

echo b > /proc/sysrq-trigger

 

Great Apps to Take Notes

It has often been said that information confers power, and that the most important currency in our culture today is information. Keeping track of my bits and pieces of information has unfortunately been an issue for some years. In part, this is because of my passable short term memory, coupled with what can only be described as 'brain fog'. To combat this, I arm myself with open source software that helps me efficiently capture a lot of information.

<A HREF="http://www.linuxlinks.com/article/20140816112531805/AppsNotes.html">Read more</A>

 

Exciting New Terminal Emulators

Even though Terminator meets all my needs, I am always on the look out for new terminal emulators that might offer a different way of working. In this article, I explore three new terminal emulators. Each of these open source applications are a long way from the finished article. The software featured here are not stable, not feature complete, and should not be used in a production environment. But they have real potential.

<A HREF="http://www.linuxlinks.com/article/2014080911395451/TerminalEmulators.html">Read on</A>

 

Top 10 Best Open Source Softwares that Rocks World Wide Web

Top 10 Open Source Softwares that Rocks World Wide Web

Open-source software is also called as OSS, which is a computer software program designed and deployed with its source code made available and licensed with a free license in which the copyright holder provides the rights to an anonymous entity for any purpose. People using OSS can distribute the software to anyone and for any purpose because Open-source software is very often developed in a public, collaborative manner. Open-source software is the most prominent example of open-source development and often compared to (technically defined) user-generated content or (legally defined) open-content movements.

The top Five reasons why individuals or organizations choose open source software are:

1) Lower cost,

2) Security,

3) No vendor 'lock in', and

4) Better quality

5) Transparency

The Open source code modification, redistribution of open-source software reserved under copyright holder according to copyright law. GNU General Public License (GPL), is a good example of it which allows free distribution under the same license for  its free usage. Software licenses grant rights to users, which would otherwise be reserved by copyright law to the copyright holder. Among thousands of  Open source software projects these 10 Open Source Softwares  listed below are the most important and valuable. These are rare software product that has no alternatives and must require.

1) Linux kernel

The Linux kernel is a prominent example of free and open source software. It is a Unix-like operating system released under the GNU General Public License version (GPLv2). Linux wasn't the first open source software project, but it was the powerful community developed by contributors worldwide. The Linux kernel is used by a variety of operating systems based on it, which are usually in the form of Linux distributions. The popularity of Linux Kernel rapidly accumulated developers and users who adopted code from other free software projects for use with the new operating system.

2) GNU Utilities and Compilers

The GNU Project is the flagship of the free software movement and Compiler Collection, which is also named as GNU Compiler Collection (GCC) which is developed by the GNU Project supporting various programming languages. The Free Software Foundation (FSF) distributes GCC under the GNU General Public License (GNU GPL), which is the source of an amazing variety of tools and utilities that, when combined with the Linux kernel, provide a complete operating system.

With the Linux kernel, the GNU utilities and the GNU Compiler Collection make up the holy trinity of the Linux world. As well as being the official compiler of the unfinished GNU operating system, GCC has been adopted as the standard compiler by most other modern Unix-like computer operating systems, including Linux and the BSD family. Versions are also available for Microsoft Windows and other operating systems. GCC is also available for most embedded platforms, including Symbian (called gcce),[6] AMCC, and Freescale Power Architecture-based chips. It is named the GNU C Compiler, because it only handled the C programming language and the compiler was extended to compile C++ in December of that year 1987.

3) Ubuntu

Ubuntu is a Debian-based Linux operating system developed to increase usability and ease of use.  Ubuntu is a free software and named after the Southern African philosophy of Ubuntu (literally, "humanness"), which often is translated as "humanity towards others" or "the belief in a universal bond of sharing that connects all humanity". Ubuntu is the first choice of novice users and PC sellers because its free and no need to pay fees. The Ubuntu project is publicly committed to the principles of open source development; people are encouraged to use free software, study how it works, improve upon it, and distribute it.

According to some metrics, Ubuntu is the most popular desktop Linux distribution. Ubuntu comes installed with a wide range of software that includes LibreOffice, Firefox, Empathy, Transmission, and several lightweight games.

4) BSD Operating Systems

Linux isn't the only popular free open source operating system, there are a number of Unix-like operating systems under active development, named behind BSD (Berkeley Software Distribution). Free BSD, Net BSD and OpenBSD are very famous examples of the BSDs.

FreeBSD is famous for superior reliability and performance. It’s a free Unix-like operating system developed by AT&T UNIX and has more than 200 active developers and thousands of contributors.

NetBSD is a freely redistributable, open source version of the Unix-derivative BSD, computer operating system notable for supporting a wide range of hardware platforms, including embedded systems and mobile devices. NetBSD is famous for its portability and quality of design and implementation, it is often used in embedded systems and as a starting point for the porting of other operating systems to new computer architectures.

OpenBSD is touted as perhaps the most secure Unix-like operating system, with a security audit that never stops. It includes a number of security features absent or optional in other operating systems and has a tradition of developing auditing the source code for software bugs and security problems.

5) Samba

Samba is Free Software licensed under the GNU General Public License, the Samba project is a member of the Software Freedom Conservancy. Samba is a free software re-implementation of the SMB/CIFS networking protocol, originally developed by Andrew Tridgell. Samba bridges the gaps between Linux/Unix and Windows, allowing Unix and Linux servers to provide file and print services to Windows clients, and Linux and Unix clients work with Windows file servers. A Samba host can even serve as the primary domain controller for a Windows network. Samba provides file and print services for various Microsoft Windows clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain member. Samba is released under the terms of the GNU General Public License. The name Samba comes from the SMB (Server Message Block), the name of the standard protocol used by the Microsoft Windows network file system.

6) MySQL

The world's most popular open source database with easy administration, excellent read performance, and transparent support for large text and binary objects make it the top choice for many Web sites. The MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. It is a popular choice of database for use in web applications, and is a central component of the widely used LAMP open source web application acronym for "Linux, Apache, MySQL, Perl/PHP/Python." Free-software-open source projects that require a full-featured database management system often uses MySQL. Applications which use MySQL databases include: TYPO3, MODx, Joomla, WordPress, phpBB, MyBB, Drupal and other software.

7) BIND

BIND is the most popular open source DNS (Domain Name System) server software on the Internet. It works on Unix-like operating systems, it is the de facto standard that implements DNS protocols for the Internet. The Berkeley Internet Name Domain package was originally written at the University of California at Berkeley.  The software consists, most prominently, of the DNS server component, called contracted for name daemon. In addition the suite contains various administration tools, and a DNS resolver interface library. The latest version of BIND is BIND 9, first released in 2000.

8) Sendmail

Sendmail is a general purpose internetwork email routing facility born before the Internet was standardized and supports different kinds of mail-transfer and delivery methods, including the Simple Mail Transfer Protocol (SMTP) used for email transport over the Internet. Sendmail served as the backbone of the Internet mail system throughout the 1980s and 1990s. It has lost ground to Postfix, Qmail, Exim, and Microsoft Exchange in recent years, but still ranks among the most popular MTAs (mail transfer agents). It is a well-known project of the free and open source software and Unix communities. It has spread both as free software and proprietary software.

9) OpenSSH and OpenSSL

OpenSSH

OpenSSH is an abbreviation of OpenBSD Secure Shell developed as part of the security conscious OpenBSD project. It is a set of computer programs providing encrypted communication sessions over the Internet using the SSH protocol. It was created as an open source alternative to the proprietary Secure Shell software suite offered by SSH Communications Security.

OpenSSL

OpenSSL is an open-source implementation software package uses strong cryptography. OpenSSH encrypts shell communications to remote computers, addressing the shortcomings in tools such as rlogin and telnet, which send usernames and passwords in clear text. OpenSSL is a software library that allows developers to incorporate SSL or TLS into their Internet applications. It was written in the C programming language, implements the basic cryptographic functions and provides various utility functions. The project is managed by a worldwide community of volunteers that use the Internet to communicate, plan, and develop the OpenSSL toolkit and its related documentation.

10) Apache

The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. The Web server that puts the A in LAMP is still fast, flexible, and secure, with broad operating system and Web programming language support and hundreds of modules available to extend the functionality. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

Apache httpd has been the most popular web server on the Internet and generally used on a Unix-like system, the software is available for a wide variety of operating systems, including Unix, FreeBSD, Linux, Solaris, Novell NetWare, OS X, Microsoft Windows, OS/2, TPF, OpenVMS and eComStation. Released under the Apache License, Apache is open-source software.

 
Page 8 of 139

Upcoming Linux Foundation Courses

  1. LFD312 Developing Applications For Linux
    16 Feb » 20 Feb - Atlanta - GA
    Details
  2. LFD331 Developing Linux Device Drivers
    16 Feb » 20 Feb - San Jose - CA
    Details
  3. LFS220 Linux System Administration
    16 Feb » 19 Feb - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board