This article was updated for Ubuntu 12.04. The new article can be found here.
These instructions are for Ubuntu 11.10 using the Unity interface.
Linux (of which Ubuntu is a flavour) and it’s inspiration Unix, have a strong emphasis and tradition of doing everything via typed commands.
Often, when searching the Internet for a solution to a problem, you often find terse (possibly cryptic) answers along the lines of:
Test if you can reach Google with
ping -c 4 google.com
To recursively change your file permissions just:
chmod 755 -R /opt/lampp/htdocs
In order to run those commands, you have to open a shell or command line or terminal (they are all synonymous, but shell is the preferred term in Linux and Unix circles).
There are many different shells, the original Unix shell is called the Bourne Shell (or
sh), then came the C Shell (
csh) and Korn Shell (
ksh). Linux tends to use the Bourne Again Shell (
bash). For the most part, they all do the same thing, so you don’t need to worry about which one you are using.
If you want to know which shell you are using, just enter
echo $SHELL and press Enter.
TIP: If you find a command line solution / trick / tip for a non-Ubuntu Linux distribution, there is a good chance (though not 100% guaranteed) that it might work with Ubuntu.
If you get a
Permission denied or
Are you root? response when you type in the command, try prefixing the command with
sudo. Ubuntu requires administrator level privileges for certain commands.
sudo temporarily gives administrator privileges (after you supply your password).
Opening a Terminal using a Keyboard Shortcut
This is the default keyboard shortcut for Ubuntu 11.10 (and probably previous Ubuntu releases) running the GNOME / Unity desktop, unless you (or someone else) has changed it, it should work.
This also the default keyboard shortcut if you have changed your desktop environment to GNOME Shell, LXDE, or the Lubuntu Desktop and will work unless you (or someone else) has changed it.
This will NOT work for the XFCE or Xubuntu Desktop unless you (or someone else) has added the keyboard shortcut.
You can access the terminal by using the keyboard shortcut:
ctrl + alt + T (while pressing down the
alt key at the same time, press the
T key as if you were going to type the letter T, there is no need to hold it down).
Opening a Terminal from Unity
1) Click on the Dash icon (or use the keyboard shortcut by pressing the Windows key):
2) Type terminal into the entry field:
3) Click on the terminal icon:
Opening a Terminal if You are not Using Unity
Because there are many different types of desktops available for Linux, it is not possible to list all possible ways to start the terminal. However … the general technique is the same:
1) Open the Main Menu or Applications Menu (or whatever the main menu for your environment is called).
2) If you are lucky, there will be a menu entry for a terminal (it might be called Terminal or LXTerminal or something else with
terminal in the name.
3) If you are unlucky, then you will have to look for it in a submenu. It is most likely to be found in either the submenu Accessories or System
NOTE: You may have more than one terminal application installed or the terminal application may appear in more than one menu location.
Does Ubuntu 11.10 work well with Flash? My “gPC” (everex) had come with an original version of Linux.. but through the years I changed it 2 Win-XP. But now i want Ubuntu back. How easy would it be to adapt to sites such as Youtube, or any other site that has a Flash??? What are the commands that I would need 2 enter to access these files? Thanks in advance for the assistance. – Kev
Yes, Ubuntu does support flash.
However, before switching from XP to Ubuntu 11.10, you should be aware that the Unity Interface (the Desktop) is radically different from previous desktop interfaces. As well, I find the Unity interface rather sluggish.
When installing Ubuntu, you need to select ‘restricted’ software from the install page. If you have already installed Ubuntu and don’t have flash support, then go to the Ubuntu Software Center and type ubuntu restricted extras and select the package Ubuntu restricted extras for installation.
You are best off trying out Ubuntu 11.10 first before committing to using it on your computer – quite a number of people have been disappointed with it.
Equally good are Lubuntu of Xubuntu. These are Ubuntu derivatives that use the LXDE and XFCE desktop interface, respectively. These desktops are very similar to the XP interface you are likely to be used to.
You can read more about Ubuntu and flash at their information page here.
How about to install a program in Ubuntu 11.10 ??
Can you tell me how to install a program with terminal??
You use the program apt-get.
I have a tutorial on it here (at least for the installing part).
any one know plz tell me, how to install any file in ubuntu 11.10 . how to give command to install file and which file i can install.
See this article on how to use apt-get to install applications from the command line.
Nice man thank you for the article.
You’re welcome and thanks for the feedback.
thank you for the article.
You are welcome and thanks for the feedback.
Whats the finish command on Ubuntu 11.10?
I don’t understand your question. Do you mean “what is the command to close a terminal”?
In that case, type exit int the command line and press Enter. This will close the terminal for you.
i want to add theme to the /usr/share/themes folder…i don’t have permission to add it manually how can i change the permission using command line.
Thanks for the question.
The problem is that Ubuntu restricts access to certain folders and operations. You can temporarily raise your privilege level by using sudo.
At the command line you can either enter something like sudo cp SOURCE DESTINATION to copy the files there (SOURCE and DESTINATION are the source and destination files / directories).
If you prefer a graphical point-click-drag interface, then you can use the command sudo nautilus – this will bring up the file browser.
It is quite possible that nautilus will complain about a missing or unreadable /var/lib/samba/usershares directory. You can always add the directory yourself.
can i open or save any file through terminal and can i use this terminal as programming language
The terminal allows you to interact with the OS.
You can certainly open and edit files from teh command line. You just have to call the right application. For example, you can use the vim editor by typing vi at the command line and then pressing Enter. Mind you, vim is not the friendliest editor. To exit vim, type :q and press Enter.
You can compile programs in a terminal using gcc – although, normally, you would use a make file to control the compilation.
Everything you can do using the GUI, you can do from the command line. In fact, you can do more from the command line than from the GUI.
There are many resources on the Internet that can help you with understanding how the various functions and features available in Linux.
Thank u Very Much
You’re welcome. Thanks for the feeback.
pls some one help me how to run fortran in ubuntu and how to install cern libraries in fortran libreries
This is not a forum and your question is off topic. However … I think you are looking to install cernlib (installable from the software center).
As far as compiling fortran programs in Ubuntu, you will need to install the fortran compiler, though (installable from software center as well).
Unfortunately, as your question is way off topic, there is no additional support I will provide.
Thank you for this short, but meaningful introduction to terminal in Ubunto. It was very useful to me to read it.
You’re welcome. I try to provide useful and meaningful information. Thank you for the feedback.
Very good article with explanations anyone can understand. Some ‘helpers’ try to make themselves seem clever by writing a load of gobbledegook which usually doesn’t answer the question or is simply wrong. It’s a time-consuming business learning this!
Many thanks for your article, a great help.
You’re welcome and thanks for the positive feedback.
I don’t deny that getting an appropriate level of detail is tough. I find a lot of computer help (especially when related to Linux) is very arcane and tends to be more in the style of a memory jogger for someone who already knows it than an explanation to someone who doesn’t know.
I hate help that sounds like: “Just foo grep the output and then pipe it through awk.”
Mind you, I have seen comments on some sites claiming my articles are too “long”. Usually, they sound something like: “He spends pages and pages explaining something that’s just a 3 line command.” It might be a 3 line command, but if you don’t know what (or how to interpret / understand) a
sudo add-apt-repository "deb http://packages.mate-desktop.org/repo/ubuntu precise main"then it doesn’t matter if it’s one line or 20.
Based on the site’s growing popularity, I think I am doing something right.
Thanks again for your feedback. (I also accept suggestions for topics).
You are doing tons of great stuff!
In an ocean of tons of confusing instructions, tutorials, forum
threads, blog posts, etc. having your site shoot straight the info
that we need, specially newbies like me, it is a heaven sent.
Keep up the good work! Maybe writing a little on dual booting, partitioning,
LVM and all the stuff needed for Windows/Ubuntu systems will be a
great help for people jumping timidly into Ubuntu.
Thank you for your positive feedback and suggestions for topics (I’m always looking for new ideas – even though I have a backlog of stuff to write about).
Yeah, I find a lot of information on the Internet isn’t exactly geared for the casual user. Often times, I find it is more like a reminder to someone who already knew the stuff, rather than an explanation to someone who wants to learn.
As for dual booting, I prefer to use VirtualBox. Virtual box allows you to run alternate operating systems (like Linux) in its own virtual machine. This way, you can run multiple OSes at the same time. In my case, I run Windows 7 as my main OS and Ubuntu in Virtual box.
When you install VirtualBox, Windows will warn that unsigned drivers are being installed – allow them.