Use Ubuntu Linux

1. Ubuntu Versions

Among the different versions of Linux, we recommend Ubuntu Linux 15.10 or later for the following reasons.

  1. It is very easy to install. It can be installed online if the user has connection to the Internet.
  2. It is very easy to install additional software packages by sudo apt-get install PACKAGE
  3. It is updated and improved regularly with new releases.
  4. It has a large user base, with many problems and solutions posted in discussion forums online.
  5. It provides easy connections to wireless networks and access to the Internet.

2. Special Features of Ubuntu Linux

Here are some helps on how to use the Ubuntu Linux.

  • When installing Ubuntu on a desktop or laptop computer, it will ask for a user name and a password to create a user account with a default home directory /home/username. When Ubuntu boots up, it immediately runs in the environment of the user because it already has the default user logged in automatically. Enter Control-Alter-T to open a pseudo-terminal. Right click the Term icon and choose “lock to launcher” to lock the Term icon in the menu bar. Subsequently, launch new terminals by choosing the terminal->new terminal on the menu bar. Each new terminal runs a sh for the user to execute commands.
  • For security reasons, the user is an ordinary user, not the root or superuser. In order to run any privileged commands, the user must enter

sudo command

which will verify the user’s password first.

  • The user’s PATH environment variable setting usually does not include the user’s current directory. In order to run programs in the current directory, the user must enter ./a.out every time. For convenience, the users should change the PATH setting to include the current directory. In the user’ s home directory, create a .bashrc file containing


Every time the user opens a pseudo-terminal, sh will execute the .bashrc file first to set PATH to include the current working directory ./

  • Many users may have installed 64-bit Ubuntu Linux. Some of the programming exercises and assignments in this book are intended for 32-bit machines. In 64-bit Linux, use

gcc -m32 t.c # compile t.c into 32-bit code

to generate 32-bit code. If the 64-bit Linux does not take the -m32 option, the user must install additional support for gcc to generate 32-bit code.

  • Ubuntu provides an excellent GUI user interface. Many users are so accustomed to the GUI that they tend to rely on it too much, often wasting time by repeatedly dragging and clicking the pointing device. In systems programming, the user should also learn how to use command lines and sh scripts, which are much more general and powerful than GUI.
  • Nowadays, most users can connect to computer networks. Ubuntu supports both wired and wireless connections to networks. When Ubuntu runs on a PC/laptop with wireless hardware, it displays a wireless icon on top and it allows wireless connections by a simple user interface. Open the wireless icon. It will show a list of available wireless networks near by. Select a network and open the Edit Connections submenu to edit the connection file by entering the required login name and password. Close the Edit submenu. Ubuntu will try to login to the selected wireless network automatically.

Source: Wang K.C. (2018), Systems Programming in Unix/Linux, Springer; 1st ed. 2018 edition.

Leave a Reply

Your email address will not be published. Required fields are marked *