Here is a quick tip to speed up your internet meme sharing prowess 🙂
- For ease of use, make a “imgur” directory under your “Pictures” home folder.
Optional Dependencies: (the URLs are put on the X selection for easy pasting.)
- xclip is available,
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 126.96.36.199-3.el5.4 installed ImageMagick.x86_64 188.8.131.52-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
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 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 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 will output the current directory you are in to the Terminal screen.
- This command will list the details of any file.
- 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 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.
- 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 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 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
- 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 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 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 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 🙂