background preloader

Using The Terminal

Using The Terminal
"Under Linux there are GUIs (graphical user interfaces), where you can point and click and drag, and hopefully get work done without first reading lots of documentation. The traditional Unix environment is a CLI (command line interface), where you type commands to tell the computer what to do. That is faster and more powerful, but requires finding out what the commands are." -- from man intro(1) This page gives an introduction to using the command-line interface terminal, from now on abbreviated to the terminal. There are also many graphical user interfaces (GUIs), but each of them works differently and there is little standardization between them. For the novice, commands can appear daunting: sudo gobbledegook blah_blah -w -t -h --long-switch aWkward/ComBinationOf/mixedCase/underscores_strokes/and.dots However, it is important to note that even experienced users often cut and paste commands (from a guide or manual) into the terminal; they do not memorize them. In Unity In GNOME . fo #! else Related:  Computer keyboarding

Linux basic configurations | network, security, server setup guides for beginner Table of keyboard shortcuts In computing, a keyboard shortcut is a sequence or combination of keystrokes on a computer keyboard which invokes commands in software. Some keyboard shortcuts require the user to press a single key or a sequence of keys one after the other. Other keyboard shortcuts require pressing and holding several keys simultaneously (indicated in the tables below by this sign: +). Keyboard shortcuts may depend on the keyboard layout (localization). Comparison of keyboard shortcuts[edit] Keyboard shortcuts are a common aspect of most modern operating systems and associated software applications. General shortcuts[edit] A note regarding KDE's shortcuts is that they can be changed and the below list contains the defaults. [edit] Power management[edit] Screenshots[edit] Text editing[edit] Many of these commands may be combined with ⇧ Shift to select a region of text. Text formatting[edit] [edit] Web browsers[edit] Tab management[edit] Window management[edit] User interface navigation (widgets and controls)[edit]

dlopen(3 Name dladdr, dlclose, dlerror, dlopen, dlsym, dlvsym - programming interface to dynamic linking loader Synopsis #include <dlfcn.h> void *dlopen(const char *filename, int flag); char *dlerror(void); void *dlsym(void *handle, const char *symbol); int dlclose(void *handle); Link with -ldl. Description The four functions dlopen(), dlsym(), dlclose(), dlerror() implement the interface to the dynamic linking loader. dlerror() The function dlerror() returns a human readable string describing the most recent error that occurred from dlopen(), dlsym() or dlclose() since the last call to dlerror(). dlopen() The function dlopen() loads the dynamic library file named by the null-terminated string filename and returns an opaque "handle" for the dynamic library. (ELF only) If the executable file for the calling program contains a DT_RPATH tag, and does not contain a DT_RUNPATH tag, then the directories listed in the DT_RPATH tag are searched. o The directories /lib and /usr/lib are searched (in that order). dlsym()

VimHowto Parent page: Programming Applications Vim is an advanced text editor that provides the power of the de-facto Unix editor 'Vi' with a more complete feature set. Vim is often called a "programmer's editor," and is so useful for programming that many consider it an entire IDE. It's not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files. This article aims to get help you install vim, and give you a basic introduction to vim. The console version of vim comes preinstalled with ubuntu; hence there is no need to install it (see note below). If you’re already using a GNOME-based desktop such as Unity, you can use vim-gnome. NOTE: As of Ubuntu 6.10 (Edgy Eft), the default Vim install is a cut-down version called "vim-tiny". sudo apt-get install vim Building Vim If you want the very latest version of Vim, you can build it yourself. Modes One of the most confusing things about vim is that it has four modes. :syn on :syn off map!

A Crash Course in Using the Mac Terminal Almost everything can be done with the Terminal. At least that’s what the experts tell you. We find glorious “Terminal Hacks” which unlock some special features of the Mac. Where’s the Terminal? Use Spotlight to launch it, or you’ll find it in the Applications/Utilities folder. Navigating the Terminal The Terminal will generally launch with your home directory selected. You can even directly navigate to a specific folder. To know that you’re in the correct directory, hit “ls” to bring up a list of file names. One important command: ^r will allow you to cycle through your history of commands. Sudo Very often one comes across this command ‘sudo’, which is generally appended at the start of a string. Creating Symbolic links Symbolic links allow you to create aliases that behave like normal files and folders. ln -s ~/Li- brary/Application\ Support/Cul- tured\ Code ~/Dropbox/Library/ Cultured\ Code ln stands for link name, and -s stands for creating a symbolic link. Nano: The Terminal text editor

Ubuntu Blog Linux Basics - Manuals "." (dot) - refers to the present working directory"~" (Tilda) or "~/" - refers to user's home directory Unix Help man <something> # general help (press the 'q' key to exit) man wc # manual on program 'word count' wcwc --help # short help on wc soap -h # for less standard programs Finding Things Finding files, directories and applications find -name "*pattern*" # searches for *pattern* in and below current directoryfind /usr/local -name "*blast*" # finds file names *blast* in specfied directoryfind /usr/local -iname "*blast*" # same as above, but case insensitive additional useful arguments: -user <user name>, -group <group name>, -ctime <number of days ago changed> Finding things in files grep pattern file # provides lines in 'file' where pattern 'appears', # if pattern is shell function use single-quotes: '>' Permissions and Ownership List directories and files Assign write and execute permissions to user and group To remove all permissions from all three user groups Change ownership General Emacs

Makefiles in Linux: An Overview Download samples in ZIP format - 9.45 KB Introduction Small C/C++ applications with a couple of modules are easy to manage. The tool I'm talking about is the make command. This article is not a full tutorial, it focuses on C applications and how to use the make command and makefile to build them. Download make_samples.zip. Contents . make command syntax is: make [options] [target] You can type make --help to see all options make command supports. make requires a makefile that tells it how your application should be built. make -f run.mk -f option tells make command the makefile name that should be processed. There are also two special names that makes -f option not necessary: makefile and Makefile. make <enter> make command will process the file called makefile. 2. Figure 1: Makefile general syntax A make file consists of a set of targets, dependencies and rules. As you see in figure 1 each command in the Rules part must be on lines that start with a TAB character. 2.1 Testing sample1 mkfile.r

Linux Shell Scripting Tutorial v1.05r3 > Misc. Linux/Unix definition Note : This file is part of Linux Shell Scripting Tutorial, and contains many Linux/Unix definition, miscellaneous concepts and answer to many shell scripts exercise section. Free Linux is free. First ,It's available free of cost (You don't have to pay to use this OS, other OSes like MS-Windows or Commercial version of Unix may cost you money) Second free means freedom to use Linux, i.e. when you get Linux you will also get source code of Linux, so you can modify OS (Yes OS! It also offers many Free Software applications, programming languages, and development tools etc. Unix Like Unix is almost 35 year old Os. In 1964 OS called MULTICS ( Mult iplexed I nformation and C omputing S ystem) was developed by Bell Labs, MIT & General Electric. Then Ken Thompson (System programmer of Bell Labs) thinks he could do better (In 1991, Linus Torvalds felt he could do better than Minix - History repeats itself.). At the same time Unix was started to distribute to Universities. Open Source or

Dig Up System Information Using the Terminal Troubleshooting, upgrading, or just curious? Find out what’s in your system without opening the case. Using these Linux command line tools, you can get details about your hardware and distribution. I’ve tested these commands in Ubuntu 7.10, but they should all work in other Linux distributions. Unless noted otherwise, all of this software is included by default with Ubuntu. Graphics card:glxinfo – details about OpenGL, the Xserver, and your graphics cardglxinfo | grep direct – do you have direct 3d rendering? Audio:lspci | grep Audio – audio controlleraplay --list-devices – more audio device information Software versions:cat /etc/issue – current distribution and versionapt-cache showpkg packagename – packagename’s version and dependenciesuname -r - Linux kernel versionuname -a – all kernel details Networking:lspci | grep Ethernet – Ethernet controllersifconfig – networking interfaces, IP addresses, and more USB devices:lsusb – USB buses and attached devices Did I forget anything?

Cygwin Part 1 Useful Configuration of Cygwin, Part 1: Install, rxvt, and BASH Installation To install cygwin first download and run the setup. Be sure to choose at least the folllowing packages: (hint: if you find the listing of packages according to groups annoying then click the "View" button in the upper-right which will change the listing order to alphabetical) Admin: cygrunsrv Doc: cygwin-doc Doc: man Editors: vim Interpreters: perl Mail: fetchmail Mail: mutt Mail: procmail Net: inetutils Net: openssh Net: openssl Net: rsync Shells: bash Shells: rxvt Text: less Utils: cygutils Packages which the above packages depend upon will be automatically selected and installed so there is no need to worry about installing dependencies. You probably want to install a lot of other packages such as perl, grep, exim, ssmtp, zip, unzip, bunzip, tar, gzip, wget, irc, links, ncftp, lftp, file, sunrpc, nfs-server, mc, and others as I have only listed ones essential for this setup.

Huawei E355 Unlocked Mobile WiFi HSPA+ 21Mbps 3G WiFi Modem Router: Computers & Accessories LSST v1.05r3 > Chapter 2 > Exit Status By default in Linux if particular command/shell script is executed, it return two type of values which is used to see whether command or shell script executed is successful or not. (1) If return value is zero (0), command is successful. (2) If return value is nonzero , command is not successful or some sort of error executing command/shell script. This value is know as Exit Status . But how to find out exit status of command or shell script? For e.g. Exercise Try the following commands and not down the exit status: $ expr 1 + 3 $ echo $? $ echo Welcome $ echo $? $ wildwest canwork? $ date $ echo $? $ echon $? $?

Mark K. Jowett, Ph.D. - Database Resources Useful Links: Back to Useful Links Working with Databases: 1) Creating ERDs Using MySQL Workbench 2) Data Modeling Checklist 3) MySQL Data Types Quick Ref 4) SQL - Quick Reference 5) Forward Engineering Using MySQL Workbench SQL Statements (Uses Premiere database: bottom of page) Log in to *YOUR* database using MySQL Workbench, AND through SSH: Notes > MySQL Workbench and SSH Login Procedures: 1. Using MySQLWorkbench, AND 2. Overall database reports: Display user, timestamp, and MySQL version: select user(), now(), version(); Display your grants: show grants; Display the databases for which you have access: show databases; Upload table structures and data: ***First: BACKUP *ALL* existing tables! drop database if exists yourusername; create database if not exists yourusername; use username; source db/premiere.sql --or... \. db/premiere.sql Database Schema and Metadata: Display all tables in database: show tables; Display structure (metadata) for each table: Examples: SELECT Statement Syntax:

Related: