Category Archives: Terminal
How-To Session: SSH into another Linux Machine
EDITOR UPDATE: updated for new methodology and systemd
Today I am going to show you how to SSH into another linux box from anywhere! SSH is a powerful, encrypted command that enables you to essentially “log in” to you PC’s, via Terminal, and move files, change configurations, as if you were using Terminal at the remote host you are logging into.
Let’s start with the essentials:
Quick Tip: Showing installed programs under Fedora
yum list installed
This will result in a list of all installed packages like so:
Loading "fastestmirror" plugin Loading "installonlyn" plugin Installed Packages Deployment_Guide-en-US.noarch 5.1.0-11.el5.centos.1 installed GConf2.i386 2.14.0-9.el5 installed GConf2.x86_64 2.14.0-9.el5 installed ImageMagick.i386 6.2.8.0-3.el5.4 installed ImageMagick.x86_64 6.2.8.0-3.el5.4 installed MAKEDEV.x86_64 3.23-1.2 installed NetworkManager.x86_64 1:0.6.4-6.el5 installed ORBit2.i386 2.14.3-4.el5 installed ORBit2.x86_64 2.14.3-4.el5 installed SysVinit.x86_64 2.86-14 installed acl.x86_64 2.2.39-2.1.el5 installed acpid.x86_64 1.0.4-5 installed ... zip.x86_64 2.31-1.2.2 installed zlib.x86_64 1.2.3-3 installed zlib.i386 1.2.3-3 installed zlib-devel.i386 1.2.3-3 installed zlib-devel.x86_64 1.2.3-3 installed
The list usually pretty huge, so you might want to pipe it through “more” or “less” so you can scroll through it a page at a time:
yum list installed | more yum list installed | less
or direct it out to a file for viewing in a text editor:
yum list installed > /tmp/yum-list.txt
How-To Session: Installing Office 2007 with Wine on Linux
With more and more people using Open Office 2.4 and Open Office 3.0, you might be asking why in the world would I post how to install Office 2007 in Linux? Well simply, on a personal level the formatting of Open Office often aggravates me. Sorry if that does not agree with you, but when the bullets and numberings system messes up my tab stops or when viewing a .ppt or .pptx files all the pictures are hanging off the page, its good to have Office 2007 as a second office suite simply for those times when Open Office makes you pull your hair out when you open that nicely done work document or that school PowerPoint project. Let me make it abundantly clear, I do not* hate Open Office, there are simply times when using Office 2007 is the better choice for at least viewing the material. Maybe someday Open Office will match the formatting quality of MS Office.
Installing Wine:
Ubuntu
Use Add/Remove under “Appications” at the top gnome menu and search for wine
OR
“sudo apt-get install wine” in Terminal.
See : This for more details
Other Distributions:
Your other distributions should definitely have this in their software repositories. Here is a list of commands which should install it, depending on your* package manager you use. All commands are performed as root user (type “sudo su”, OR “su -” in Terminal) and are done in your respective Terminal.
- For pacman : “pacman -S wine”
- For YUM: “yum install wine”
- For All other Distributions and package managers see: Wine HQ’s Binary Downloads
Installing Microsoft Office 2007 via Wine:
- Insert the Disc containing the Office 2007 install. Note: if you have burned a copy of MS Office 2007, make sure* that the “setup.exe” and the reset of the folders are present in the root or starting directory when you open the CD, otherwise complications can occur on install especially with the commercial version of Wine, Crossover Office Pro
- Cancel the autorun box if it appears
- Open up Terminal, in gnome this is done by going to Applications > Accessories > Terminal, from the top menu bar.
- Now type “cd /dev/cdrom0” where cdrom0 could also be “cdrom” The best way to determine what /dev location has your CD is to do “ls /dev | grep cd” This will show any devices matching cd, try uppercase as well.
- Once you “cd /dev/cdrom” in Terminal, type the command “ls -la” to see all contents, making sure the “setup.exe” is present for you Office 2007 disc.
- Now type “wine setup.exe” (or replace setup.exe with the name of the setup installer .exe file) to begin the installation process
- Follow the prompts as usual
- When finished, you will now see a program listing under the Applications menu on the top bar for “Windows Applications” and The Office Apps should be there now.
Notes:
- Some apps have odd compatibility issues but , Word, Powerpoint, and Excel all run without a hitch
- This install process is pretty much the exact same for Office 2003
- If you wish to add a new “save” point, i.e. when you hit Ctrl+S or “Save” in a program, you can edit the “drives” by going to Applications > Wine > Configure Wine and going to “Drives.” From here you can add any* folder, even folders in /mnt or /media to be a “drive” in the wine virtual world of Windows. This would be just like if you booted up windows and hit “Save” and browsed to the C:\ drive to save your document.
- For an application compatibility listing please see Wine HQ’s App List
Hope you enjoyed this How-To and for reading The Linux Cauldron.
Cheers!
_Nano
How-To Session: Compiling Software From Source Code
Learning to unpack that tar ball!!! Most source packages will come in simple tar.gz packages so, lets go over how to extract things: (all of which is done in Terminal) Getting your hands dirty: Now we are going to go over the basic syntax of compiling from source: Some packages don’t follow this simple syntax, and you sadly can’t blame them as there is no official standard for compiling from source. The above is just a guideline. Uninstalling a source program: If you have any comments/suggestions PLEASE comment this post or use the “Contact Us” page at the top of the site. I would like to thank you for reading this entry and hope you return. Cheers! _Nano
Out of request I am going to cover a topic often overlooked by many in their first Linux baby steps: compiling from source. I will do this in the most general sense, even if there is great community repos and tools like Yaourt for Arch Linux that installs source from the User repository and ABS, their source compiling package tool. It will be relatively short but hey, source can be confusing to some people.
Some other things to know:
Mount it! Part 1: How to manually mount your Local Hard Drive:
NOTE: This is an old article and remains here for posterity. The updated article can be found at:
http://wp.me/ptjWO-dB (short link)
http://thelinuxcauldron.com/2013/06/20/core-concepts-understanding-fstab-and-seriously-wtf-is-fstab/
Today In Terminal: Love thy CLI , Basic Terminal Commands for New Users
Today I will be going over the basic Terminal commands a new user should know. In case you are unaware the Terminal can be accessed via Applications > Accessories > Terminal. Think of the Terminal as a beefed up and much more robust DOS Prompt or Command Prompt. The Terminal itself is merely an “emulator” of the BASH shell, or bourne again shell. It is an app that interprets the parameters of the BASH shell.
The first and most important thing to know is how to navigate your terminal :
“cd”
- cd will change directory. For example if we wanted to change to the /home/user directory, or the users “home” directory we would type “cd /home/user”. Also, “cd ..” will change directory up one level.
“ls”
- ls will list the available files/folders in any directory you are in. Good to know options for ls are : “ls -a” , which will show all files (including hidden), and ls -la, which combines the best of both worlds and provides a long listing (easier to read) of all available files.
“pwd”
- pwd will output the current directory you are in to the Terminal screen.
“File FILENAME”
- This command will list the details of any file.
“cat FILENAME”
- This will concatenate a file and output to the screen. For example if I were to “cat /home/user/file.txt” it would output the contents of that file to the screen.
“less FILENAME”
- Less is a more powerful command than the “More” command which is very similar in nature. Does sort of the opposite to cat, where instead of outputting to the Terminal screen, outputs to a blank screen. Press q to quit here.
“man COMMAND_NAME”
- The man command is especially use full if you do not know how to use a particular command of application. For instance “man apt-get” in Ubuntu will display all the relative help and details for that command.
Piping a command with “|”
- the vertical line (Ctrl + Backspace) will pipe and output. For instance, “man grep | less” will pipe the man page of grep to less
“find”
- find will search for files. For instance, “find temp”while in a users /home/user or “home” directory, will search for anything named “temp.” You can also specify a path if you want to find in another directory. For instance, “find /home/user/programs/VMware” will try to find “VMware.”
“grep”
- grep will grab the output you specify. For instance, “find /home/mikeyd/| grep temp” will search my home directory , and grep any entries that have temp in the path name
“clear”
- This command will clear the screen
Up or Down on Keyboard
- Pressing up or down on the keyboard will show the previous or , if you went back a few commands, down will show you the next command.
“cp”
- cp will copy a file or folder. You may have to put “sudo” in front of the command if that file or folder is protected. For a file the syntax would be “cp /path/file.txt /home/user” where the file.txt is being copied to “/home/user”, which is a folder. For Folder copying, the syntax is “cp -Rv /path/folder /home/user” where R option means recursive (all files and folders underneath that directory if you wish), v option for “verbose” (outputs whats its doing for each file copied), and the folder is being copied again to the “/home/user directory”
“rm”
- rm will remove a file or folder COMPLETELY from the system. If you wish to recover it later, drag that file he trash on your bottom panel (far right). Syntax is as follows “rm /home/user/temp.txt” for a file or “rm -Rv” for a folder. You may have to put sudoinfront of the command . Be very* cautious while using rm
“mkdir”
- mkdir will create a directory. Syntax is “mkdir /home/user/new_directory” where this creates a “new_directory” in the users’s “/home/user” directory. If you wish to make a folder in the current directory, simple do “mkdir new_directory” You may need to put sudo in front of mkdir if it is a protected directory.
That’s it for today. Hope these commands help you in you Linux endeavors. Take it easy at first, while it may be intimidating to use the terminal, it is your best friend 🙂
Cheers!
_Nano