HowTo: Ubuntu Command-Line Edition
Hello Folks! I hope all is well with you... I have been using Ubuntu for about a year now and happy (as a hippo) using it I have really enjoyed the change. What a great job the guys from Canonical are doing (I reckon!) Ubuntu is simply great. Of my particular interest is the Ubuntu derivatives which many of them exist Ubuntu, Kubuntu, Edubuntu, XUbuntu, Ubuntu Christian Edition, Ubuntu Lite, Ubuntu Ultimate Edition, Ubuntu Satanic Edition... etc. A couple of weeks ago I was thinking about the old times: MS-DOS, DR-DOS, Wordstar, lotus123, BASIC, etc avery application running from the command line with those rather difficult key-stroke combinations. Well we still have a lot of stuff like that but incorported nicely in a GUI so basically you do not have to use it if you do not want to but it is there just in case. What would happen if all the eye-candy and any graphical environment? we would end with a computer greeting us all the time with the command prompt:
(do you know '~' stands for /home/user-name) which would be enough to scare even the most proficient Windows(TM) user... After some thinking and a bit of research I decided to reinstall Ubuntu in text-mode only. So no X, no window managers, no eye candy, just text, plain text. Then play and work with this Liinux system for a couple of weeks just to see if I could survive in this highly dependent computer world... Yes I am crazy... everybody say that... Though the Ubuntu version is completely text-based is not a light weight distribution. It is based on the Ubuntu Server installation which actually requires about 500 MB plus additional terminal based applications which will make your life easier (unlike Puppy or DSL which require about 50MB)
Before we begin some warnings for beginners (experienced users can skip this paragraph): Since no graphics are going to be available and only a bit of mouse support is to be provided; is necessary you refresh your mind about the Unix/Linux commands. If you do not know them you are going to waste your time and it is going to be a very frustrating experience... and a Disclaimer: The information provided is as is with no guarantee that the same results will be obtained in your system. The software mentioned here is not endorsed or supported by me I did install them on the sole purpose to improve my text-based Linux console. I will not be responsible of any use of misuse which leads to a system failure or data loss or related issue. OK (A good idea would be to test on VMware)
Requirements
Computer - PC, MAC, Sun, etc.
Processor - Any supported by Ubuntu
Memory - The more the better
Hard drive - I would say 3 GB (The installation is about 1.5 GB)
Ubuntu Server Edition Installation CD
Broadband Internet Connection
Procedure
The procedure is Install Ubuntu Server -> Replace the kernel to one suitable for your system -> Modify the screen resolution -> Install ruby -> test the internet -> Install the rest of the applications.
Detailed procedure
(1) Install Ubuntu Server in the usual way and set your account (login and password)
(2) after installation the only thing you will see is the command prompt
(3) move to /etc/apt and modify sources.list (remember to use sudo)
(4) uncomment all the repositories
(5) Put attention to the 'Universe' section which says something like this
Code:
deb http://archive.ubuntu.com/ubuntu/edgy universe
write multiverse at the end of that line
Code:
deb http://archive.ubuntu.com/ubuntu/edgy universe multiverse
(6) After installation I did replace the 'server' kernel with the generic-kernel (don't askme why I did this. I just did it)
(7) Modify the resolution of the console: go to /boot/grub and modify menu.lst (sudo required)
(eight) on the kernel line add this argument vga=0x0314 or vga=0x0317 the former is for super vga resolution and the latter for ultra vga resolution. This kernel argument activates the frame buffer which will give you a nicer appearance. more info about the frame buffer kernel argument can be found here
http://enterprise.linux.com/article....&tid=39&tid=89
Unfortunately there is no support for wide screen for the frame buffer (am I right?)
(9) Ruby is needed since some application will require it.
Code:
sudo apt-get install ruby irb1.8
(10) Reestart the computer and you should see the change in the screen resolution
(11) connect the computer to the internet
(12) Install lynx - your new web browser:
Code:
sudo apt-get install lynx
(13) Try to access to the internet typing
Code:
lynx http://www.google.com
(14) The google web page should appear
(15) OK we have the very basic system now to install all the applications
Installing the applications
(16) Picture Viewer fbida it can display virtually all the formats except HD photo from microsoft
Code:
sudo apt-get install fbida
a typical usage is
Code:
fbi picture_name.jpg
(17) Picture converter and manipulator imagemagick
Code:
sudo apt-get install imagemagick
(eighteen) File Manager choose from: midnight commander (similar to the old Norton Commander for DOS) or vifm which has a command structure equivalent to 'vi' (the text editor)
For Midnight commander
Code:
sudo apt-get install mc
for vifm
(19) calcurse ToDo list and calendar
Code:
sudo apt-get install calcurse
(20) For music the ogg support is desirable
for the codecs
Code:
sudo apt-get install vorbis-tools
and for the ogg player
Code:
sudo apt- get install ogg123
(21) crip as a cd ripper
Code:
sudo apt-get install crip
(22) RSS feeds reader: raggle
Code:
sudo apt-get install raggle
(23) Screen Saver: cmatrix which display the falling characteres seen in 'The Matrix' movie
Code:
sudo apt-get install cmatrix
(24) Terminal Tools: Gnu screen which is a terminal multiplexor in other words is like having multiple desktops within a terminal screen without moving to other terminal, vlock a terminal lock so nobody can use the active terminal should you have to leave your computer alone (I am sure this is not needed because most of the people won't understand what the hell is going on. Only you) and GPM a mouse driver for terminal based applications which gives you some functionality...
Code:
sudo apt-get install screen
sudo apt-get install vlock
sudo apt-get install gpm
(25) Spreadsheet:Oleo
Code:
sudo apt-get install oleo
(26) Presentation: ttp
Code:
sudo apt-get install tpp
(27) Word and Document processing: nano, pico, vi, which are installed with the base install, LaTex a document processing markup language, antiword converts .doc files to .txt .html or .pdf files. halibut for document format anticonversion. fbgs a pdf visualisation tool. fbgs is installed at the same time as fbida
Code:
sudo apt-get install tetex-base tetex-extra tetex-bin
sudo apt-get install antiword
sudo apt-get install halibut
(twenty-eigth) Scientific calculator
python command line already installed type 'python'
ruby command line already installed type 'irb1.8'
(29) Programming Languages python and ruby
(30) c++ compiler: gcc
Code:
sudo apt-get install build-essential
(31) Games: nethack
Code:
sudo apt-get install nethack-console
(32) Videoplayer: mplayer. There is a youtube application but I haven't installed yet 'youtube-dl'
Code:
sudo apt-get install mplayer-nogui
(33) SendEmail Email client
Code:
sudo apt-get install sendemail
(34) A virtual mahine: qemu to install Freedos or the MSDOS or other Linuxes or Windows
Code:
sudo apt-get install qemu
(35) Print
I moved to a place where I don't have a printer so I am not including this in the guide
(36) And the last step: update/upgrade your system
Code:
sudo apt-get update
then
Code:
sudo apt-get upgrade
This installation will give you a pretty useful system. You can do all the basic stuff: rip CD's listen to music, watch videos, subscribe to RSS feeds, send email, web browsing,
document creation, calculators, spreadsheet... and a virtual machine...
Typical usage
The first thing you will see after booting up is the command prompt some very basic commands are
cd change directory
cp copy files/directories
mkdir create a new directory
clear will clean your screen from 'text accumulation'
df for checking your hard drives capacity
top show the active processes running in the system
alt+Fkey[1-6] switch between 6 different terminals
to create a terminal within a terminal type
then you can create more terminal by pressing
and to switch between those terminal
The very first week is very strange but then you get used to it. I think now I know hundred of commands, switchs and parameters. A good way to learn a lot more about linux... finally I would love to see a Linux text-based Macbook Pro... So this is geekiest thing I've done so far. Hope you enjoy it as much as I am enyoing it now...
Re: HowTo: Ubuntu Command-Line Edition
i don't get it, how do you view pictures and play videos without X ? otherwise, interesting guide. (you may want to have a look on mpd for music playback, it has some commandline clients, ncmpc is so good that i don't need anything else even with X)
Re: HowTo: Ubuntu Command-Line Edition
Links is a way better browser than Lynx, I'd recommend that instead.
I do have a virtual machine running Ubuntu server, and I kinda liked the challenge. I use it as a development server.
Re: HowTo: Ubuntu Command-Line Edition
A few notes on screen:
Ctrl+a+n and Ctrl+a+p send you back and forth through your screens.
Ctrl+a+d "minimizes" your screen. The cool thing is you can log out and return to your applications by typing "screen -r" in the terminal.
Ctrl+a+[ lets you scroll around and select text. Hit enter to start, move your mouse, and hit enter again.
Ctrl+a+] pastes the text you selected above.
w3m is an amazing web browser like Lynx, I like it.
mpg123 is great for MP3's
moc (music on console) is a cool media player
irssi is perfect for IRC
wget is for downloading files interactively
and gimp-command-line-edition is an awesome Photoshop alternative.
Thanks for the links! Lots of interesting things here.
Re: HowTo: Ubuntu Command-Line Edition
Very nice tutorial: nice summery of all the applications out there.
As for viewing pictures and movies in the console, it uses framebuffer to accomplish this feat. Its an old trick, and works somewhat similarly to how the console background and Ubuntu splash screen work. It works with quite a few applications, including the web browser "links2".
If you want a basic mouse, gpm will do that for you. That, coupled with framebuffer and links, gives you a full functional web browser, with images, without X.
The only problem with this tutorial is: Why do you have to say how to install every single application! just say: apt-get install <packagename>, and list the packages and what they do.
I was using a system like this for a while, but I recently caved in and decided to splurge for Xubuntu. My computer is a P2 300Mhz laptop with only 160Mb of ram, so don't worry if your computer is not all that good.
My favorite applications:
Screen - amazing virtual terminal system, make, show, and hide VTs. Also has support for copy/paste/scrolling/searching, much like vi or man. A great thing to do with it is split your screen in half. :D
mplayer: does everything, like vlc, but for console. Links2 - as mentioned above, like lynx, but with graphics support!
cmatrix - havent tried it yet, sounds awesome though :P
Note: You can turn on X from a normal Ubuntu installation temporarily, if you want to try running this. Just remove xdm/gdm (dont remember which) from the startup runlevels.
Re: HowTo: Ubuntu Command-Line Edition
Very nice tutorial :D
Just a suggestion, if you want msn and others like it support, just install centericq :D
Re: HowTo: Ubuntu Command-Line Edition
just checked the framebuffer & mplayer combo, pretty sick:) i just cannot get a fullscreen video playback - it displays the video in its original size in the center and everything else is black... how could i make it display properly?
Re: HowTo: Ubuntu Command-Line Edition
I'd imagine for any serious command-line questions that may be difficult to find answers to don't forget the Gentoo forums as we tend to revel in the command line.
Very nice how-to on setting up Ubuntu from the command line. While not completely essential I'd imagine you'd probably want to install OpenSSH and the server ssd. That way the person interested in it doesn't necessarily have to leave a nice GUI on another system to get used to using that system in command line, but it might be overkill.
Re: HowTo: Ubuntu Command-Line Edition
anatole, same problem, not on ubuntu but on gentoo though :P If you find a solution, pm me. It also exists in X for me.
rukuartic: Thanks SOO much for pointing out moc. It is my new favorite media player, even for X enabled machines. I think I will end up donating to the project eventualy... Its exactly what I have been looking for for years now.
Re: HowTo: Ubuntu Command-Line Edition
For ripping cds, you should use cdparanoia and oggenc to encode what you ripped.