Welcome to 2012!

It’s been so unbelievably long since my last post on this blog that I decided to start this year with a non-technical welcome.

I have great plans for UnixTutorial in 2012, and would welcome any opportunity to share knowledge and experience with all of the readers and new visitors
of this blog.

Here’s just a few of the things I plan to do:

  • UnixTutorial members area – long time coming, this area of the website will finally make a proper debut in the next few months. I’ll be announcing the next round of email subscriptions shortly, so don’t miss out if you’re still interested
  • A series of UnixTutorial eBooks – eventually a balanced collection of free and paid material in PDF and Kindle formats (polls to decide which topis are in demand will follow shortly)
  • Broader coverage of Unix topics – this year I expect to write a lot more about Mac OS and AIX systems
  • New WordPress theme and quite likely a mobile copy of the website (let me know what devices you have, I own  iPhone and iPad so will do initial testing)
  • Completion and expansion of the Basic Unix Commands and Advanced Unix Commands sections
  • More Unix book reviews and recommendations
  • Reviews of latest Unix-like OS releases
  • Even more Questions and Answers

If you expect to see even more – now would be a really good time to let me know by leaving a comment. Thanks and stay tuned!




Using dig command to confirm TTL for a DNS zone entry

As you probably know, TTL (time-to-live) parameters can be set not only for the whole DNS zone you’re managing, but for each individual zone entry. A common example could be a higher TTL for the zone as a whole, while having much smaller TTLs for critical servers like web or MX servers.

Not everyone is aware that dig command is very useful for entry-specific DNS research. This post just shows you a very simple example.

dig to confirm TTL for a DNS entry

When using dig, we’re usually after a specific section of its output. Consider this simple query (your output may slightly vary):

srv1# dig www.google.com

This query targets a specific DNS record – namely the www. one, rather than a whole google.com domain.

; <<>> DiG 9.7.1-P2 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4968
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 13, ADDITIONAL: 8

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         541187  IN      CNAME   www.l.google.com.
www.l.google.com.       156     IN      A       209.85.148.104
www.l.google.com.       156     IN      A       209.85.148.105
www.l.google.com.       156     IN      A       209.85.148.106
www.l.google.com.       156     IN      A       209.85.148.147
www.l.google.com.       156     IN      A       209.85.148.99
www.l.google.com.       156     IN      A       209.85.148.103

;; AUTHORITY SECTION:
com.                    37414   IN      NS      d.gtld-servers.net.
com.                    37414   IN      NS      e.gtld-servers.net.
com.                    37414   IN      NS      g.gtld-servers.net.
com.                    37414   IN      NS      f.gtld-servers.net.
com.                    37414   IN      NS      a.gtld-servers.net.
com.                    37414   IN      NS      h.gtld-servers.net.
com.                    37414   IN      NS      b.gtld-servers.net.
com.                    37414   IN      NS      m.gtld-servers.net.
com.                    37414   IN      NS      c.gtld-servers.net.
com.                    37414   IN      NS      j.gtld-servers.net.
com.                    37414   IN      NS      i.gtld-servers.net.
com.                    37414   IN      NS      l.gtld-servers.net.
com.                    37414   IN      NS      k.gtld-servers.net.

;; ADDITIONAL SECTION:
a.gtld-servers.net.     22830   IN      A       192.5.6.30
a.gtld-servers.net.     23008   IN      AAAA    2001:503:a83e::2:30
c.gtld-servers.net.     581     IN      A       192.26.92.30
d.gtld-servers.net.     581     IN      A       192.31.80.30
e.gtld-servers.net.     581     IN      A       192.12.94.30
f.gtld-servers.net.     581     IN      A       192.35.51.30
g.gtld-servers.net.     23226   IN      A       192.42.93.30
h.gtld-servers.net.     581     IN      A       192.54.112.30

;; Query time: 1 msec
;; SERVER: 88.198.6.2#53(88.198.6.2)
;; WHEN: Fri Jul  1 03:50:38 2011
;; MSG SIZE  rcvd: 512

We’re only interested in the ANSWER section:

;; ANSWER SECTION:
www.google.com.         541187  IN      CNAME   www.l.google.com.
www.l.google.com.       156     IN      A       209.85.148.104
www.l.google.com.       156     IN      A       209.85.148.105
www.l.google.com.       156     IN      A       209.85.148.106
www.l.google.com.       156     IN      A       209.85.148.147
www.l.google.com.       156     IN      A       209.85.148.99
www.l.google.com.       156     IN      A       209.85.148.103

As you can see from this example, the global www.google.com name is a CNAME entry with quite a high TTL, pointing to a number of www.l.google.com A entries with a much smaller TTL. In this particular example, the TTL for each www.l.google.com is 156 seconds, which is slightly less than 3 minutes.




Upgrading Ubuntu with do-release-upgrade

There comes a time (a couple of times a year, actually) when you may want to upgrade your Ubuntu distro (read here for instructions on confirming your version of Linux: Find Out Linux Version)

Once that’s done, you can use do-release-upgrade for a hassle free upgrade.

IMPORTANT: are you can see, I’ve used a really old Ubuntu server with 8.10, hence your procedure for upgrading more recent Ubuntu versions may be slightly different. For example, later upgrades will warn you if you’re doing a release upgrade over ssh.

What do-release-upgrade is and when you should use it

do-release-script is a Python script which automates the process of updating multiple packages. It relies upon Ubuntu’s core package management functionality.

Apart from downloading and installing updated versions of packages found on your system, this command attempts to take care of all the necessary Ubuntu-release related file changes.

Step 1: Run do-release-upgrade

Once you type the do-release-upgrade command name and press Enter, you should see how vital information about packages currently installed is being collected:

# do-release-upgrade
Checking for a new ubuntu release Done
Upgrade tool signature Done
Upgrade tool Done
downloading
extracting ‘jaunty.tar.gz’
authenticate ‘jaunty.tar.gz’ against ‘jaunty.tar.gz.gpg’
Reading cache
Checking package manager
Reading package lists: Done
Reading state information: Done
Updating repository information
Done http://archive.ubuntu.com jaunty Release.gpg
Done http://archive.ubuntu.com jaunty-updates Release.gpg
Done http://security.ubuntu.com jaunty-security Release.gpg
Done http://us.archive.ubuntu.com jaunty-backports Release.gpg
Done http://security.ubuntu.com jaunty-security Release

Checking package manager
Reading package lists: Done
jaunty-security/multiverse
Packages: 98  2
Reading state information: Done
Reading state information: Done
Reading state information: Done
Calculating the changes

 

2. Confirming what upgrading will do

This is your last change to change your mind. All the necessary information about your current Ubuntu release is collected, and now you’re presented with the exact upgrade details: how many packages will be removed, how many new ones will be installed, how many will be upgraded. You also are given details about the required amount of data to be downloaded should you decide to proceed with the upgrade;

Do you want to start the upgrade?

1 package is going to be removed. 23 new packages are going to be installed. 420 packages are going to be upgraded.

You have to download a total of 248M. This download will take about 7 minutes with your connection.

Fetching and installing the upgrade can take several hours. Once the download has finished, the process cannot be cancelled.

Continue [yN]  Details [d]

Ready? Press y for yes!

3. Downloading all the packages

Just like with apt-get, you will now see the progress of downloading all the updated packages for your Ubuntu OS. At the bottom of the screen you will see the overall completeness of the download (22% in my example), the current download speed (598kB/s in my case) and the ETA:

Done http://archive.ubuntu.com jaunty-updates/main libbz2-1.0 1.0.5-1ubuntu1.1
Done http://archive.ubuntu.com jaunty/main libdb4.7 4.7.25-6ubuntu1
Done http://archive.ubuntu.com jaunty/main libncursesw5 5.7+20090207-1ubuntu1
Done http://archive.ubuntu.com jaunty-updates/main libssl-dev 0.9.8g-15ubuntu3.6
Done http://archive.ubuntu.com jaunty-updates/main libssl0.9.8 0.9.8g-15ubuntu3.6
Done http://archive.ubuntu.com jaunty/main python2.6 2.6.2-0ubuntu1
[23%] 598kB/s 5min17s

4. Upgrade

Once package are downloaded, they will get installed once by one, with package-specific questions asked for software like postfix or apache.

5. Reboot

To finalize the distro upgrade, you will need to do a reboot. Once completed, you should have a shine next release available.

Recommended books:




Suggest a topic for the Operating Systems Basics

Hi everyone, and thanks for staying with Unix Tutorial for so long! I’ve been quietly upgrading the blog engine and components of the Unix Tutorial Members Area to get things ready for the long-awaited second module of the Introduction to Unix course.

If you’re have a topic which you think belongs to the Operating Systems Basics module, please leave a comment.

The purpose of the module is to give a very high level overview of how modern operating systems work and to also explain the importance of securely managing all the available resources (hence a few topics on files, users and privileges). Almost every single topic deserves a separate module, if not a course, on its own – but for the moment it will be really basic stuff.

Here’s the list of topics so far:

  • What OS is and why we need it
  • Features of a modern OS
  • Kernel and kernel modules
  • Features of Unix OS
  • MINDMAP: Features and components of an OS
  • Everything is a file! Types of files in Unix
  • A typical filesystem tree of a Unix-like OS
  • Users, privileges and file ownership
  • Executing a binary file in Unix

See also:




Unix Tutorial Gets its Own Page on Facebook

unix-tutorial-website-logo

If you have a Facebook account and would like to get in touch with other visitors of this blog to discuss Unix, here’s a great way to get started: join the Unix Tutorial Facebook page!

See you all there, and feel free to share your suggestions – either here or on the wall of the Unix Tutorial.




Climate Change: How You Can Help Prevent It

Since it’s Blog Action Day 2009 today, I’d like to remind all the readers of my blog how climate change can be prevented by following really simple rules.

Since Unix Tutorial is a technical blog, I’ll try and stay as technical as possible within the topic.

Virtualize to consume less energy, get rid of old hardware

Old servers required a much bigger commitment in the past: not only did they cost a fortune, but they also needed a lot of space and required a lot of power. These days, 1u or 2u server solution can easily outperform a computing system which used to take a whole cabinet in your datacentre. And since the cost of supporting old hardware only increases with each year, it makes a lot of sense to simply but a new server to replace the old infrastructure.

If you’re really big into the whole life cycle thing, an even better approach is to virtualize most of your systems. There are quite a few great solutions today – vSphere from VMware, Xen and KVM based virtualization from RedHat and the xVM family of virtualization solutions by Sun Microsystems (Oracle).

A ratio of 15 virtual machines per 1 physical server isn’t that uncommon, which can give you an idea about the kind of improvement you’ll get by following the route of virtualization.

The math is really simple: shut down 15 old servers, keep only 1 new server running – this means greatly reducing the amount of energy and therefore helping the planet stay green for a bit longer.

Read from your screen, print less

Perhaps on a much smaller scale, the issue of printing materials is also a direction you may want to explore if you’re serious about helping the climate change prevention.

Many of us still print dozens of sheets of A4 paper a day. We print out emails and directions, man pages and screenshots – many of these to never be used again.

Start small and pay attention to every urge of yours to print something out. Ask yourself a few simple questions just to be sure that you absolutely need each piece of the information printed out.

As a Unix administrator, you should find ways to monitor your printing service. Even simple things like weekly stats of the top users printing stuff out might sometimes help you save really big on the paper and toner cost. Many users print stuff out without a certain reason for doing so – it’s just their habit.

This means that if you’re familiar with lpstat and lpadmin commands, you have a chance to help yourself and others become more aware of how much you’re printing and what can be done to break your printing patters.

eInk-based book readers are a great alternative for those of you who claim they absolutely can’t read off screen. It may be a while until A4-sized readers become widely available and affordable, but already you can get a book reader for just a few hundred dollars and this little device can be used for storing and reading of many books – all without much of an environmental impact, since you no longer need paper books.

Use only what you need

You’ll be amazed how much can be saved if you run CPUs on your system at the speed sufficient to fulfill your computational needs instead of having everything running at 100% of their speed!

Many modern servers have power-awareness and intelligence built-in. I especially like blade server solutions – Dell, HP and Sun have all got a range of blade enclosures and blade servers on offer.

The beauty of using blades is that blade enclosures are extremely intelligent and configurable devices – you can use them to cap the power draw for your whole enclosure or a certain blade. Such power limitations will usually result in a lower performance, but for many solutions it’s not critical at all. For example, if your blade hosts a FlexLM licenses server or serves web pages, it will be almost impossible to spot a performance difference even if you significantly lower the CPU speed.

Most operating systems support power management options. For desktops, this means ability to manage the speed of your cooling fans or the speed of your CPU which immediately has an impact. Sometimes you can also control your graphics card in the same manner. If you add screen blanking and hard drives management to this (configuring the sleep times for periods of long inactivity), you have all you need to reduce the power draw of your PC and ultimately help our planet stay the way it currently is or maybe even get refreshed over the next few years.

That’s it for today! Sure enough, these tips may not seem to be all this climate change preventative, but trust me – we all have to participate with however small steps and environmental improvements we can think of.

See also:




Ask me a Unix question on Twitter

Hi everyone, it seems to be really long since my last technical post here – too much stuff happening at work, plus I’m studying for a CCNA exam.

If you’re in need of quick help – drop me a message on Twitter – I’m UnixTutorial there. I can’t promise a prompt reply, but at least this way you’ll have some interactivity.

I see how many people leave questions in comments to my posts, and I don’t always have the time to reply – so feel free to send me an email if you really need my help.




Ubuntu 9.04 Jaunty Jackalope screenshots

I’m finally getting ready to start publishing some tips with screenshots, so today it’s just a humble screenshot tour of my fresh Ubuntu 9.04 install.

Let me know if you struggle with any graphics desktop functionality, and I’ll try my best to help and show it with screenshots.

By the way: I really like one of the new community themes which come with Ubuntu 9.04, it’s called the Dust theme.

[nggallery id=1]




Update on Unix Tutorial Membership

Hi all, and thanks for a great interest in the Unix Tutorial membership!

A warm welcome to all the new members!

In just 2 days, more than 50 of you have joined, so I’m confident we’ll have great time sharing Unix knowledge in the next few months.

I’ve got the first few modules of material posted already – they’re really simple but that’s the whole idea as I target beginners of all levels with my introductory course. I’ll be posting more modules in the coming days, and there’s already a curriculum posted on forums for people to discuss.

Only 3 more days of free UnixTutorial membership

Unfortunately, I’m also seeing a lot of interest from spammers – because the membership is free, no credit card or Paypal transactions are involved, and this means anyone can register and start spamming the protected forums.

Given the above situation, and also because I’m going away for a few weeks rather soon, I have just decided to close the first wave of enrollments earlier than originally planned: Unix Tutorial enrollment will be closed down this Friday, midnight GMT.

If you know someone who’s eager to get started with Unix, please tell them about Unix Tutorial membership so that they can get onboard before the enrollment is over. I’m looking for genuinely interested people prepared to commit some of their time, so if it’s just about someone hoping to get a placeholder for accessing premium content in the future – please refrain from signing up at this time.

That’s it for the moment! Thanks again for your interest, I’ll do my best to make sure you learn plenty of new Unix tricks and gain immediately applicable knowledge.

See also:




Become a Unix Tutorial member!

October 2018 UPDATE: thanks for stopping by! Glad to see you are interested in seriously advancing your knownedlge of (most likely) Linux operating system! I don’t have the course available but am writing a few technical ebooks and make Unix Tutorial membership avaible via closed Facebook group: Unix Tutorial group.

Unix Tutorial - Facebook Group
Unix Tutorial – Facebook Group

Become a lifetime Unix Tutorial member!

If you think you know enough about Unix Tutorial membership, then wait no more and proceed straight to the Unix Tutorial group. For everyone else, there’s a bit more information below.

Why I’m setting up a members area

As you’ve probably seen, I’m trying to encourage as many people as possible to start using Unix-like operating systems. So far, I’ve been doing this by sharing tips and how-to guides on various Unix challenges I’ve come across in my 10+ years of system administration. While this had proved to be very popular, I would like to take it all one step further by publishing a few courses on various Unix topics.

Structure makes learning much easier, and I hope to involve even more people by providing a thorough learning plan for each level of Unix learners: beginners, intermediate users and advanced users which plan to use or manage Unix professionally.

I’m planning to set up a membership section on Unix Tutorial, because this seems to be a great way to help you grow Unix systems from scratch or just fill in some of the gaps you might have in your knowledge. Some materials with be based on the existing articles, but most of the content is going to be an easy-to-follow series of guides, interactive diagrams, exercises and tests developed in accordance with the curriculum of each course.

Before you ask: no, it doesn’t mean I will stop posting on Unix Tutorial blog – in fact, I hope membership-only discussions will make many more Unix challenges visible and this will allow me to cover them on Unix Tutorial blog pages in my usual how-to manner.

How you will benefit

These are the reasons for you to become a member of the Unix Tutorial site when it opens again:

  • Structured approach to learning Unix – the Unix Foundation course is going to be an introduction to what Unix is and what are your options when learning or using it. If you’re just getting started with Unix, or even if you’re using it already but just want a refresher – this is going to be your chance to learn the basics and to address any gaps you have
  • Individual support – I will be actively monitoring forums to help you with Unix challenges, and on top of this there’s always going to be an option to contact me through direct messages on forums. This is not planned to be a technical support hotline, so please don’t rely on this for any critical issues – this being said, I’m going to do my best to address your questions within days, if not hours
  • Community of like-minded Unix users – it’s much easier to interact in a smaller group of like-minded people. Those who wish to do so, will be doing introductions on forums, and this is bound to help you not only solve immediate technical issues, but to also find interesting blogs to follow, Unix users to learn from and to collaborate with, and Unix fans of all levels to share your experience with.
  • Learn anything you want about Unix – many books and websites target what their authors believe should be taught to their target group. Quite often such works prove to be quite disappointing for both authors and readers, because not all the topics are interesting or relevant enough to the needs of the audience. You’ve probably seen already – most of my posts on Unix Tutorial are based on the search queries from my visitors or questions asked through the Ask a Unix question form. I love this approach! It helps me to always write about the things you want to learn.I plan to use the same approach with my study courses – anyone can suggest a topic for a course, but registered members will obviously get a preference for their suggestions. If you ever wanted to learn something about Unix – shell scripting, performance tuning or re-compiling a Linux kernel – I will gladly take your ideas, research them and present as learning objectives for you and other members of Unix Tutorial.

Will Unix Tutorial membership be free?

There’s still a lot of planning to be done about the membership area, but here’s how I see it so far:

  1. There will ALWAYS be a number of free courses available at Unix Tutorial
    You will still have to register, but it will not cost you anything to join. Most likely the free courses will be of introductory nature – they prove to be both most popular and most beneficial to anyone learning Unix. After the initial enrollment period, I’ll close the registration for a few months to polish off the few courses I have planned, to reopen membership sometime in summer or early autumn.
  2. Plenty of video material will be public and shared via Unix Tutorial Youtube channel.
  3. There will be paid content as well
    I’m going to spend a lot of time developing the courses, and therefore I think some of them will be available on a paid basis only. This is most likely going to be a set of niche topics in the intermediate-advanced level of technical expertise. From my experience, such topics will only prove useful to a small group of people who are willing to take their Unix knowledge to a whole new level.
  4. There will be a  paid membership
    For those interested in constantly learning more about Unix, this will probably be the most attractive option – a small monthly fee will provide access to all the Unix courses available, including the new ones as they get published.
  5. Paid technical support/solutions architecture
    I’ve been doing this for quite some time – so it’s probably going to be one of the services available to Unix Tutorial group members. If you have a technical issue which needs a solution, I can research it for you. If you have a project requirement and want me to map out a technical solution for you – I’ll be able to do this as well. Depending on how much time is needed for other activities in the Unix Tutorial members area, such services may come at an additional cost.

There’s nothing set in stone yet, I’m really just getting started. I have a vision of a great learning environment where we’ll be able to learn and share knowledge, and this is going to be my focus. I have a full-time job, so Unix Tutorial membership will not be a chance for me to make a living off it… That being said, if there’s enough people willing to learn and to pay, I’ll be delighted to have an opportunity to spend more of my time helping others.

First Unix Tutorial members

In the next few months, I will work with the first wave of members, help them go through the courses and answer all the technical questions they might have, and will use this experience to further improve the courses and the way they’re presented.

The initial Unix Tutorial membership is a unique offer, because it will be a life-time access to Unix Tutorial courses. I would like to offer it free of charge, but with one condition – if you become one of the lucky first members,  you should be genuinely interested in learning Unix and being an active member of the community – participating in discussions and helping others. As one of the initial members, I would like you to help me improve the members area by completing a few surveys (sent out sometime between mid-March and mid-July, I promise not to ask too much of you but it’s crucial that I get your feedback).

The full-scale opening of the Unix Tutorial membership area is planned for July 2009, but is still subject to change.

Sounds interesting enough? Join the Unix Tutorial group! Look forward to meeting you in the members area!