# Mageia (Linux-distribution) --- do as root user: urpmq -y searchfor .... search for package urpmq -i package ... show information for package urpmi pkgname ..... install pkgname urpmi --auto-update .... install updates urpme pkgname ..... uninstall pkg rpm -qa ... list all packages rpm -qf /bin/bash ... to what package belongs /bin/bash? rpm -qi bash ... view information about the bash package (already installed) rpm -ivh mydld.rpm ... install manually from package file drakrpm-edit-media --expert ... enable/disable update sources # OpenSUSE, Fedora, RedHat, Mandriva: all rpm-based distr`o`s OpenSUSE: zypper instead of urpm[qie] Fedora/Redhat: yum, ‘Yast Update Manager’ Mandriva: like Mageia a successor of the formerly as-deveres-do-pago⋆ Mandrake-Linux ⋆ what-you-need-to-pay-for, will contain some proprietary software-content/ conteudo de logiciél dnf: an alternative/new package manager available œ in use/at disposition by many/most rpm-based distr`os (full·text: distributions) œ or/and{:en}, ou/e{:pt}, o/y{:es}, oder/und{:de} logiciél: from fr, em{:pt} en: software, ‘a thing based on logics’, em:pt ~ in:en, in:de, en:es # OpenSUSE > zypper ar http://download.videolan.org/pub/vlc/SuSE/11.4 elstel “add-repository”: add a new source of rpm-packages to-be-found at the given URL URL: ‘uniform resource locator’, a (usually named) internet address, starting with a protocol-spec. protocol: specifies how two computers connected by a network (‘endpoints’) will communicate examples for protocols are: http, ftp, gopher(very old, now·a·days not used any more as 2my·knowledge), rtp (real time protocol, what f.i. the VLC-player can decode) LAN = local area network, does not need to be connected with the internet! spec. ≝ specification, defines what and how a thing is, will or shall be VLC ≚ video lan client, a well-known, widely spread open source program, not only available for Linux and *BSD, but also a good choice on Apple iOS/iMac as-well-as windows computers *BSD ≚ different kinds/development branches of the BSD operating system, examples: FreeBSD (most widely spread), OpenBSD (developed ssh, and the libressl-Library), NetBSD, DragonflyBSD operating systems of the BSD·kind have a license that permits you to develop a proprietary software, one that you can sell or use for business-purposes without sharing, upon the given open-source logiciél ssh ≝ secure shell client: where you can connect to a remote computer running a text console ‘shell’ œ any other text console program you like; widely used for remote administration, log into the computer that hosts your website, runs an apache(http) or ftp server. openssl/libressl: library (i.e. something that different programs/applications use together for a given purpose, and something that at the same time has documentation and a well-defined interface, so that any people who want to use the library for their own purpose can do) documentation,interface: what will say/tell you what a given unit/program-piece of the library shall do interface: like the documentation, but fully machine-interpreted, your programming language needs to know the interface of the library as much as the programmer who uses it does. The interface specifies what variables and what procedures/functions a library supplies, i.e. the names of these, the parameter lists, and the variable-types of parameter variables (in here: ~‘formal parameters’) and/or globally exported variables exported variable: what a program unit or library exports, i.e. what other program units will see (vão ver:pt), and what they are allowed/can »link« to i.e.(:lat) ≝ iter est = “what means”:en = consequentamente é :PT = folglich wäre/gilt :DE ftp ≝ file transfer protocol, in the former internet preferrably used for any kind of download, at the times where the http-protocol was unable to continue interrupted downloads, a´thing that requires to download a given file not just from the beginning (offset: 0/zero), but from any location (offset: number of ‘skipped’ bytes that go before the actual starting point of the new transferral) > zypper lr > zypper refresh > zypper in mypackage # IRC Commands, “Internet Relay Chat” usable directly under some IRC-clients The chat server the open source community used for chatting, asking questions, formerly was freenode.net nowadays it is ‘libera.chat’. /nick ritchel /msg nickserv identify 674381 /join #mageia /join ##linux # the keyboard & editing text in an editor: keystroke-combinations: [Ctrl][C] ... copy [Ctrl][V] ... insert [Ctrl][X] ... cut out = copy + delete [Ctrl][A] ... mark the whole text in order to copy, insert instead of it or cut out the respective text portion, ¡if you continue to type but some portion of your text was selected (usually displayed by inverted colors) then the formerly selected text portions become deleted and lost in favour of what you type a·new. Just move the cursor, that in-a-usual case should undo the current selection [Shift][←|→|↑|↓] ... start selecting a given text portion only by use of your keyboard, using the mouse you click on the start of the selection, hold the left button down, move up to where you want the selection to end and then loose your hold on the mouse button. [Ctrl][Z] ... usually leads to an undo of the last editing operation [Ctrl][Shift][Z] or sometimes [Ctrl][Y] ... redo an editing step that you have just undone with [Ctrl][Z] [Shift][a] = [A], [Shift][z] = [Z] ... The default ‘lettering mode’ for your keyboard are ›small caps‹. You can change this by the key [⇓], which swaps between the lettering-modes of ›small-caps‹ ‘abcd…’ and ›big-caps…‹ ‘ABCD’. The key-denominations used in here write [S] instead of [s] as this is what you can find printed on the physical key, you pull down with one of your fingers. [Shift] :normally [Caps Lock] ~ [⇑], a ›modifier key‹ like [Ctrl], [Alt] or [AltGr] [Ctrl][F] or sometimes [Ctrl][S] ... search for a given word or a few words in sequence separated by spaces in your text [Ctrl][Pos1=Home|End] ... usually jumps to the beginning or end of your text (file) [Ctrl]=[Control]=[Strg]=[Steuerung:de], [Alt]=[Alternative], [Shift]=[Umschalten:de], [AltGr]=[means something like “Alternative Symbol”], [Fn]=[Function] some keyboards/teclados{:pt,:es}/Tastatur{:de,sg}/clavier{:fr,sg} have a coloured text printed at the bottom/front side of the key, usually green or blue. It says what the key does whenever the [Fn] modifier key is being held down. Often these additional key allotations go to keys with special hardware functionality (até independent of the operating system) like dimm-up or dimm-down of the screen luminescence(de:Lumineszenz)/brightness, activating or deactivating an external monitor. Additional [|Fn-]*]-keys can go to producing keys that did not fit into the area/space of the keyboard, especially on notebooks, keys like PageUp, PageDown, Insert, Delete or the like can be affected. [Ins(ert)] ... change editing mode between overwriting(at first press) and insert(restoration of the default on a second (or even) number of press(-times)). [Num (Lock)] ... behaves similar to [Caps Lock]/[⇑] but not changes between small and big cap(ital) letters but between the numerals [0],[1-9] and the arrow keys for cursor movement œ the insert state key state keys: either in state 'on' or state 'off' modifier keys: change the behaviour of a key at being stroked, according to the combination of modifier keys held down at the respective time key·stroke: when you press-down a key, ‘hit’ a key (… and go on), if yee as a programmer wanna-dô avoid the question “where is the [any]-key??”. l'élément numérique{:fr} = Ziffer{:de} = numeral{:en} = dígito/cifra{:pt,es} artigos{:pt}: o dígito, a cifra (diz sexo e o numero entre singular e plural) artículo{:es}: la cifra, el dígito even: 0, 2, 4, 6, ... , -2, -4, ... odd: 1, 3, 5, 7, ..., -1, -3, ... sg. ~ singular, only one of it, pl. ~ plural, many of it, e.g.: te mau fare e.g. ~ exemplo dado {:pt}, example given {:en} i.e. ~ iter est {:lat}, that means{:en}, folglich ist{:de}, consequentemente é {:pt}, así eso es{:es} lat. ~ latim:pt, latin:en, Latein:de, the language spoken in the old, historic roman empire. # playing music, shooting photos of your display-screen/ of what is on your monitor: xfce4-screenshooter ... make a screenshot, run that with [Alt][F2] kcharselect ... view and use special characters, run that with [Alt][F2] xine my.ogg ... play music pavucontrol, alsamixer ... two programs to control sound volume, on problems see also: www.elstel.org/xchroot/ # keystrokes interpreted by all/most of the console programs (as long as they do not disable the pertinent Unix-signals, that are generated against the run program when you press such a key) [Ctrl]-[C] ... break program execution by a SIGINT [Ctrl]-[\] .. at me the same as [Ctrl][AltGr][ß] or [Ctrl][AltGr][?] without [Shift]: break program execution more rudely by a SIGTERM ps ax | grep part-of-the-program-name ⇒ see what ›pid‹ the desired program has (number in-a-front) kill -9 »pid« ... shoot the program, i.e. terminate it without the program can/could even notice that!, usually avoided because it can lead to data loss or half·ly written files with inconsistant and non-readable/não_legivel data/dados{:pt}. Signal number #9 is called SIGKILL. When using a computer data-loss can not always fully be prevented, so ¡¡¡first and very thing to learn when using a computer, always make a safety-copy of your data on an external medium like an USB-stick or a DVD-RAM!!. All other user-burnable CD formats like BD-R, BD-RW (blue rays you can burn one(BD-R) or multiple times(BD-RW), but data is always written in the sequence from start to the end), CD-like media, namely CDs, DVDs and BDs normally use the iso-9660 or the ›udf‹ filesystem. *file systems used on random access media* like hard disks, floppy disks or hard disk drives: ext2, ext3, msdos(=fat), minix(for floppys instead of FAT), vfat(later extension of FAT used by Windows), btrfs(Linux only), hfs(an OS/2 file system, readable under Linux, more performant & better usable than FAT), ext4(the newest extension to the ext-family of file systems, at current time no other operating system OS than Linux implements ext4). > man 8 signal fat = file allocation table, the file system of DOS (with some remanents to CPM-times like only having a root directory on each medium, i.e. nothing more than files but no (user-)directories. magnetic tapes, as used very-more in the history of computing are considered non-random-access as well. more simple: xkill ... you can klick on the/a window/janela{:pt} of the program/app. you want to terminate [Ctrl]-[Z] ... stop program execution, lets you enter commands on the user-shell; while program execution is suspended control is passed to the parent program using the same tty(text console, see /dev/tty[1-9] and /dev/pts/[0-9], or see by entering ›tty‹). [Ctrl]-[L] ... clear/wipe the current screen, same as clear under bash, or cls in the old basic-language. ___ You can continue a stopped program by: ›fg‹ to run it in the foreground, or by: ›bg‹ to run it in the background; » sleep 15; [Ctrl][Z]; bg; « does the same as » wait 15 & « Use an [&] to terminate the command (here: sleep 15) ___ > sleep 15 & echo "waiting 15s …"; wait %% [1] 17765 waiting 15s … [1]+ Done sleep 15 __ jobs ... display all background jobs at the current time %% ... the last job put into background/bg-mode %1, %2, %3,… ... the first, second, third job output by the jobs list, can be used instead of the ›pid‹ __ > sleep 15 & sleep 10 & jobs [1] 18052 [2] 18053 [1]- Running sleep 15 & [2]+ Running sleep 10 & > kill %2 [2]+ Terminated sleep 10 > kill 18052 [1]+ Terminated sleep 15 __ for shell scripts, I do personally prefer storing the ›pid‹ in a variable over use of the ordinal job number: > sleep 7 & slpid=$!; echo "waiting 7s …"; wait $slpid; [1] 18352 waiting 7s … [1]+ Done sleep 7 > echo $slpid 18352 > kill -SIGCONT $slpid bash: kill: (18352) - No such process // the pid ‘process identifier (number)’ becomes unassigned as soon as a process terminates (= reaches the endpoint of its execution). # most essential Linux terminal/user-shell(/‘console’) commands su .... become root (password: a) passwd ... change password for root if root passwd ritchel ... change password for ritchel if root see: /etc/passwd, /etc/shadow, /etc/group ls ... list directory ls -l ... long directory listing cd .. ---- go to parent directory cd ~ ---- go to /home/ritchel cd dirname ---- change to directory file HelloWorld.txt ---- detect file type, see whether it is a plain text or a binary file # output´, create and append to files cat HelloWorld.txt ---- output file content to terminal cat >download-urls.lis --- create a new file donwload-urls.lis, overwrite it and paste the keyboard input from stdin (/dev/stdin or /dev/fd/0) right into this file |line aaaa |bbbb line 2 |[Ctrl][D] ... the eof (end of file) character, python: chr(4); not written into d.u.lis, caught by the stty-‘line discipline’ cat >>download-urls.lis --- append the document obtained from stdin onto file download-urls.lis |3. line ccc |[Ctrl][D] cat a.lis b.lis c.lis >abc.lis --- concatenate a.lis, b.lis and c.lis overwriting the target file abc.lis head HelloWorld.txt ---- first lines of file, head -n 3 file: display the first three lines tail HelloWorld.txt ---- last lines of file # editing & viewing files less HelloWorld.txt ---- view longer file, standard program; /searchtext ... searches for 'searchtext' mc -v my.txt ---- view with midnight commander leafpad HelloWorld.txt ----- edit file, other GUI editors: gedit, kedit, kate, a reference to any-such: xedit mcedit my.txt; // mc -e my.txt ---- edit with midnight commander; leave mc with [ESC], you are asked whether you wanna save your changes if existant, mcedit, go to the menu: Alt-{S|C|M|W} have worked at me, while Alt-{F|E} where caught by the xfce4-terminal program where midnight commander runs inside its window, continue editing after menu operations: [Esc(ape)]. little editors, known: nano, pico, jed classical OSS/Unix editors, you will have to learn many keystroke-combinations used for specific purposes: vim, emacs environment variables, as can be put into your ~/.bashrc, run for every bash user session: export EDITOR=mcedit VISUAL=mcedit # globbing and path expansion in user-shells $ echo ~ /home/ritchel $ echo *.txt HelloWorld.txt htcodes+syms.txt htcodes.txt htsyms.txt $ echo *.[Tt][Xx][Tt] HelloWorld.txt htcodes+syms.txt htcodes.txt htsyms.txt MSDOS.TXT $ touch myfile-0.blob myfile-1.blob myfile-2.blob myfile-3.blob myfile-4.blob $ echo myfile-[1-3].blob myfile-1.blob myfile-2.blob myfile-3.blob $ echo myfile-?.blob myfile-0.blob myfile-1.blob myfile-2.blob myfile-3.blob myfile-4.blob $ rm -f myfile-?.blob ---- remove the very same files printed just one line above $ ls -l myfile-* ls: cannot access 'myfile-*': No such file or directory $ touch hug-1.hug hug-2.hug hug-A.hug $ echo hug-[^0-9].hug hug-A.hug ___ $ ls -l *.[J][Pp]*[Gg] *.[Hh][Tt][Mm]* ---- list .jpeg, .jpg, .JPG, .html, .htm, .HTM and things like .jPmaxiG $ echo *.* ---- list what usually is a non-executable file, executable files do not have an ending like .exe, .bat, .cmd or .com under DOS, Windows or OS/2, directories most often don´t contain a ‘.’ dot either; remember that it is just a convention that user-data files contain an ending like helloworld.txt, my-urls.lis, my-photo.jpeg, my-web-page.html, you could rename such a file simpy to my-web-page, and programs that do not rely on decisions made by the ending of the file name (here: .html) will do the same. ___ ? ... matches always exactly one character, * ... matches zero or more characters, [abc] matches one of the caharacter 'a', 'b', or 'c'. [0-9] ... any numeral between and including 0..9, [^0-9] ... matches anything else than a numeral between 0..9. hidden files begin by convention with a '.' dot, exception to this are the two implicit directories named '.' and '..', where '.' stands for the current directory, and '..' for the parent directory of the current dir.. Use of '../../hugodir' refers two directory levels up in parent-direction for to look there for hugodir ___ $ echo .* --- display hidden files, take care if or if not '.' and '..' get included _ Files that begin with a '.' are by convention not shown/ presented to the user under Linux/Unix. $ cd ~; echo .* .bash_history .bashrc .cache .config .local .mozilla .mutt .purple .python_history .ssh .thumbnails .xsession-errors $ cd ~; echo .[^tx]* .bash_history .bashrc .cache .config .local .mozilla .mutt .purple .python_history .ssh # general Linux terminal/user-shell(/‘console’) commands cp myfile /destination-directory/ --- copy file cp -i myfile /destination-directory/ --- copy file and ask before overwriting a file with the same name at the destination ask-back if you really wanna do (-i) cp -a directory /destination/ --- copy directory with file attributes (-a) cp -r directory /destination/ --- copy directory (-r) mv -i file /new-destination/ --- move location of file, -i takes care that nothing is overwritten mv file file.bin --- rename file rm file ----- delete file ln -s /home/ritchel/Desktop/HelloWorld.txt . --- create a link to that file in the actual directory ".", the link can only be used as long as the base file exists, file is not copied mount /media/myCF64 ---- mount compact flash removable drive umount /media/myCF64 ---- unmount before removing it mount ---- show all mounted devices mount | grep sd --- mainly show mounted hard drives mount | grep sd[a-z][0-9] --- show mounted partitions mount /dev/sr0 /media/cdrom --- mount cdrom, use also: mount -t iso9660|-t udf /dev/sr1 /media/cdrom eject /dev/sr0 --- eject cdrom mkfs.ext3 -L myusbstick -m 0 /dev/sdb1 ... format drive sdb1 with ext3 and delete all data on sdb1, 0% reserved for user root mkfs.vfat -L myusbstick /dev/sdb1 ... format with a file system readable on windows, deletes all data on sdb1 __ use thereupon: mount -t ext3 ... or mount -t vfat ..., ext3 file systems may be mounted as ext2, where ext2 is the same as ext3 without ›journalling‹, in case of a crash the file system journal should recover the content of a file consistently up to the point the program had succeeded to write it, means the file system does/should not get corrupted in this case, remedy if it happened: fsck.ext3 /dev/sdX, or: fsck.ext2 /dev/sdX. By use of a journal everything is written twice: first to the journal, then to the actual file on disk. If the computer crashes during a ‘write operation/transaction’ then half of the data to be written is in the journal and not yet anything in the actual file. Incomplete journal entries (sg:entry) are skipped/overwritten on the next write operation. A journal entry is marked to be done by an atomic write, i.e. only writes one data unit which either suceeds or fails as a whole, so that no superfluous copy from journal to file-on-disk needs to be done on remount/reboot. ... for mkfs.* see at the text section where I have said a few words about ext2, ext3, ext4 or btrfs and the-like. Just search for it by [Ctrl][F](sometimes [Ctrl][S]) "ext3" in this text. Perhaps you need to scroll to the beginning of the text in order for this to function, use [Ctrl][Pos1]/[Ctrl][Home] in the majority of cases of the different an editor an user can/could use!, [Ctrl][S] most likely saves your file on disk and does not search for anything, “find” is the correct English word to be remembered. ___ ls /dev/sd* --- list disk devices mount /dev/sdb1 /media/usbstick ---- mount a device manually if the filemanager did not do it man ls ---- get more info about ls df -m .... show free disk space for each partition df -m / .... show free space to install programs df -m /home ... show free space for user files du -sm directory ... show space occupied/used by directory free -m ... show free main memory find / | grep searchtok ... finds all files and directories containing searchtok (execute as root) find /home/ritchel | grep searchtok ... find searchtok in home directory (execute as user) find ~ -type d ... find all directories under home find ~ -type f ... find all files under home find /media/myCF64 -type f -daystart -ctime -12 ... find all files created after 12 hours of the start of the day find ... -atime 12 / -mtime 12 ... search for access time or modification time rather than the creation time # operating system 'user's: su ritchel ... become user ritchel when being root you should only use the root user when absolutely needed, as for installing new software, mounting/unmounting devices like an USB-stick, for re-setting the users password or editing some privileged configuration files like found under /etc. The 'root' user has user-id (uid) 0 ‘zero’. Human users usually start from an ordinal number like 1000 on, below there you have special purpose logiciel-users like an own uid just to run the Apache www/web server. Not using root is especially recommended for GUI-programs (graphical window programs) that access the network (security risk, cracking/hacking/intrusion!), but as-well a good habit just for anything you do on a command shell, you don´t want to have issued a deltree-root that deletes everything on disk/your_computer, and you as-well do not want to delete a whole folder by accident, as this easily happens if you have an rm -fr xxx anywhere in the command history and you had recalled one of the commands from the history. whoami ... output current user name id, id -u ... output user id sudo whoami ... execute whoami as root (ritchel needs to be in /etc/sudoers) # use the history when entering your commands on a shell history ... display all commands you have previously entered in the correct order /etc/inputrc ... file for the shell (under Linux bash is the standard) and its readline-interface {library that lets you move the cursor and recall commands from history by special keystrokes when entering a line of text on the console.}, that defines which key-code maps to which shell-readline-command. What key-combination the user has pressed, f.i. [Ctrl]-[C] is translated into one or into a sequence of bytes, called here the “key-code”. The ›xev‹-program ‚X-event’ shows you the key-codes as produced by the X-window system/ X-window server (yes you can run a program on a remote machine interconnected via LAN (use: xhost +foreign-host2allow/ xauth, and: DISPLAY=remote-X-server-IP:0 myprogram) [↑] ... previous entry in the history instead of the currently typed line of text [↓] ... next history-entry [Ctrl][↑] ... at me it searches the history in backward order for a line beginning with the word, that I have already entered, history-search-backward in /etc/inputrc $ grep history-search /etc/inputrc "\e[5~": history-search-backward "\e[6~": history-search-forward IP = internet protocol, IPv4: 192.168.0.1, 127.0.0.1, 127.0.0.2 IPv6: ::1, ::2 (also/may be needed: [::1], [::2]), what is used in the internet to specify a remote machine/computer. Certain IP-ranges are reserved for use within the local area network LAN, like 192.168.x.x or 10.x.x.x. netmask: often specified in addition to the IP: 192.168.0.13/255.255.255.0 or 10.0.0.3/255.0.0.0. The zero·es in the netmask are where a different computer in the same network (e.g.: LAN) WAN: world area network, as opposed to *LAN* local area network, synonym for the Internet. TCP: transport control protocol, a protocol used on top/ in addition to IP, it guarantees that no data is lost, and that the order of the sequence of bytes transmitted is maintained as is, 'Hello world!' is not allowed to become 'He worllold!'. UDP: most simple protocol that can be used on to of IP. It takes no measures against package loss, nor has it means to find out about the order in which packages were sent. If there is a special order in which the packets need to be interpreted œ processed, then the application/user_program needs to take care of sending usually an apt ordinal number as part of the transmitted udp packages. *a sepcific difference between UDP and TCP*: UDP is packet-oriented, while a program using TCP does not know what data went into which IP-packet. The IP protocol on its own is already packet oriented, but this property is lost in_front_of_the/a_partir_do executed program/application. TCP is called ‘stream-oriented’, UDP is called ‘packet-oriented’. If you just had a serial cable between two computers, as in former times, you would entirely certain have it stream-oriented. No need for packages if there is only one destination computer at choice! (for those who are interested, the device-file of the serial line(s) are: /dev/stty[1-9] under Linux, COM/COM1/COM2 under DOS/Windows and OS/2) You in general case can not use bare IP, i.e. IP without any other protocol like TCP or UDP on top of it, as the operating system needs to decode packages, starting on from IP following up with TCP or UDP in most cases. There is also ICMP (internet control messaging protocol) which is executed in case of you do something like 'ping 192.168.0.27' a command that shall show you whether machine 192.168.0.27 is up and running (iter_est/i.e. the machine has not crashed yet). Special firewalls can block the ICMP-answer on the ping, so take this not afar of consideration{:en}/ afora dos pensamentos{:pt} if another machine does not answer. More likely cause for an answer not given is that both machines are physically connected but in a different ›logical‹ subnet like 192.168.0.13 and 192.168.1.10. If you are/were interested, look for “netmask” œ “subnet” in the same document. Usually editors and web browsers (Firefox, etc.) let you search in the same text for a given word to show you where-in-the-text the given word does appear: [Ctrl]-[F] RTP, real time protocol had been another example for a protocol used on top of IP or IP+UDP. The later one is more common, because mere RDP/IP does require RDP to be implemented and handled as part of the operating system (Linux, Windows, MacOS, …). You also find the ‘speak’ of TCP/IP very often in computer-related matters, and it means the TCP-protocol used on·top of IP, the very protocol that reins the internet and can_be/is used also the very on LANs local area networks. œ or/and{:en}, ou/e{:pt}, o/y{:es}, oder/und{:de}, “o/e-Ligatur{:de}” # useful hardware-related commands dmidecode | less ... show installed mainboard + hardware lspci ... show devices on internal pci bus lsusb ... show usb devices dmesg --follow ... look for Linux kernel messages which do f.i. appear on plugging in an usb stick, or after an unsuccessful mount mcc ... run Mageia control center (do that as root) location of many config files: /etc/ # process management, each program occupies at least one process __ some programs/apps do a 'fork' system call, where you will see a parent process owning many childs __ Executing a new program requires a 'fork' as well, in order the current program not to be replaced by the new one by 'execve' (another system call) ps ax | grep thunderbird ... see whether thunderbird is running pstree -p ... show which process started which other pgrep thunderbird ... just output the pid of thunderbird pgrep dhclient ... explore how dhclient has been invoked: ls -l /proc/3286/exe cat /proc/3286/cmdline cat /proc/3286/cmdline | od -c cat /proc/3286/cmdline | strings kill 7762 ... kill process with that pid kill -9 7762 ... force killing process, also kill -SIGKILL 7762 xkill ... kill a program/process by clicking on its window # opening, comparing, downloading, viewing and editing files youtube-dl https://youtube.... --- download from youtube url as shown in the address bar of the browser wget https://www.elstel.org/software/SHA512SUMS ... download file from the command line wget -p https://www.elstel.org/xchroot/index.html ... store web page for offline use (also: right click on page in firefox and save as) firefox index.html ... show a locally stored page with the Firefox web browser which -a wget ... see where the wget program is installed (first line is executed when invoked without a path) oowriter mydocument.odt ... edit a document with formatted text that can contain images (binary file) leafpad mydocument.txt ... edit plain text file or configuration file mcedit mydocument.txt ... edit on the command line: note you can click on the menu items mc ... midnight commander (text mode file manager) xdg-open anyfile.xxx ... open anyfile.xxx with the default program, as done under the X-windows GUI. cmp file1 file2 ... test if two binary files are the same diff file1 file2 ... show difference between two text files kdiff3 file1 file2 ... show difference between files (GUI) # follow a log file, display system services, terminal programs tail -f /var/log/Xorg.0.log ... show if new messages appear in that log file (exit with [Ctrl][C]) less /etc/X11/xorg.conf ... configuration file for starting the graphical surface journalctl {--since|-S} {now|today|2025-03-15} [-k/--dmesg only show kernel messages] journalctl {--boot|-b} {0|-1|-2] [-k] ... show from current, last, ante-last boot on instead of --dmesg, --unit=xxx can be specified either xxx=apache or xxx=httpd for the Apache www-server, if your Apache server does not use own text files under /var/log/httpd/ like most of the Apache installations do. --dmesg/-k likely to be combined with -p {0-9}, priority #0 is highest, only emergency, system-halting messages get displayes kernel messages: dmesg --follow; elder distros simply: tail -f /var/log/messages systemctl -t service -a | grep lxdm .... or simply | grep dm ... see that display manager starting the graphical surface is running you should not need: Xorg -configure ... create an xorg.conf if graphical surface is not running xterm ... simple terminal lxterminal, xfce4-terminal, kterm, gnome-terminal ... terminal programs, each desktop environment like LXDE, Xfce, KDE, Gnome, Mate, etc. has its own terminal where you will see a ›user shell‹ like ›bash‹ or ›ksh‹ to be run. The terminal emulator determines the window/janela of your terminal session, the font used inside the terminal window and everything regarding screen output & input. The user shell determines which builtin-commands you are allowed to enter. Most useful commands are external programs, see by 'which cp', it displays a path where the 'cp'-executable then resides. # seeking for help: mc -h; mc --help; ... many programs have a built-in quick-help (displayed by the same program) man ls; .... view the manual page for the ›ls‹-command man 8 signal .... show manual page for 'signal', of section 8 man man ... show what each manual section number 1-8 is used for help ... display the most important commands exit/ [Ctrl][D] on a still blank new line ... quit the current terminal session, [Ctrl][D] ~ end of file character, chr(4), most programs that expect user input in the form of a command line react on [Ctrl][D]/EOF the same way as if you enter the ›exit‹-command (i.e. python, bash, ksh, …). lx[tab] ... show all programs that start with lx [Ctrl][Alt][F2] .... go to text mode command line screen [Ctrl][Alt][F1] .... go back to graphics mode screen (other distributions: [F7]/[F5]) man -k line | grep "([18])" | grep -iv "command line" apropos/ things about “line”, manual sections '(1)' and '(8)', however not containing (-v) the 'command line'; the -i switch means ignore-case (lower-case 'abc', upper-case 'ABC'). info sed; ... offers more extensive help than just a »man sed«. … or seek for help on the IRC chat network, where computer users and programmers will be around. You don´t need to install an IRC-client like kopete or don´t know if pidgin supports IRC, you can join an IRC chat list via your web browser; see ix2w.org → Chat & Comm. Don´t paste text that is longer than the line you enter by keyboard, you are expected having tried on your own, including one or another web search via startpage.com or Google. $ which wget $ strings /bin/wget | less ... undocumented programs for-where there is a hack: view just any »string« (that is how text of defined length, most often less than 200 chars, is called with programming languages) that is part of the binary program code never view a binary file like /bin/wget with cat, head, ..., use: $ xxd /bin/wget | less or: $ od -txC -c /bin/wget | less # GUI quirks, you should hopefully never need: xrandr ... show screen resolution, configure external screens xinit ... start the graphical surface if none is started yet, usually an xterm is the only client that will appear twm ... tag window manager, each desktop environment has an own window manager, that draws a frame around each window and offers operations like resizing, moving or quitting windows to the user; other window managers: openbox, jwm(very small like twm), swm(for very small screens a 640x400), kwin_x11/kwin_wayland(KDE), metacity(Gnome), xfwm4(Xfce), matchbox-window-manager, wmaker(package: windowmaker), enlightment, compiz(+OpenGL), mutter(+OpenGL), pekwm, dwm. Only one window manager can be started at a given time; you need to kill the previous window manager in order to launch a new one. interesting tools in the context of window managers: wmctrl, xdotool system tray: wmdocker(WindowMaker), kdocker(KDE), usually part of the panel so that it does not need to be started alone, exception would be OpenBox/Tint2. panels: lxpanel(Lxde), mate-panel, kpanel(KDE), recommended for tests/recovery: tint2(small, initiall for use with the openbox window manager) startlxde ... start the lxde desktop when you just have a plain shell without anything else after xinit systemctl restart lxdm ... restart graphical surface: all programs will be terminated!! other display managers: lightdm, kdm, gdm, xdm. The display manager presents a graphical user login or logs-in the previous user automatically, then it starts your default desktop environment like Xfce or Lxde. ¡¡ ·note·: Wayland is a relatively new and little-tested alternative to the Xorg-X11 server. However use is not recommended, especially not for computers with limited video memory resources. Wayland does not work without a feature called “compositing”, where a complete image of every window as well as the complete image of the whole screen as background for all the windows need to be held in video memory, this can soon amount to a very multiple of just a full-screen image at the current resolution, usage of »compositing« is des·recommended! The common heavy-weight desktop environments like Gnome or KDE switch this feature on by default, however you can disable compositing in the config menu of kwin, at least for the former old versions of kwin, that I have seen and used. !! xdpyinfo | grep -i "composite" ... tests if the X composite extension is available for use, if a program should require it # hard power off, standby and suspend $ shutdown now ... traditional command to shut down and power off a computer $ systemctl poweroff/reboot/halt ... as by systemctl/systemd, the default to use with many2most newer computers $ init 0 ... shut down, init is still available with systemd, but known from the days before systemd $ init 6 ... reboot $ poweroff/reboot/halt ... as far as I remember standalone commands available since the beginning times of Linux, in addition to ‘shutdown now’ $ uptime ... time your computer is already running $ systemctl -f suspend ... standby, -f(orce) switch needs to be used in case you have opened a text console at [Ctrl][Alt][F1-F4] in addition to the GUI/X-Windowing System. $ systemctl -f suspend-then-hibernate ... a more a safe suspend mode, after a certain time without resume request by the computer (opening the lid/screen, pressing a key, moving the mouse) it will go to hibernation $ systemctl -f hibernate ... write a memory image onto disk, so that you can unplug your computer and resume a month later, without any energy being used to maintain a standby or suspend mode. $ systemctl -f hybrid-sleep ... if your battery is already weak and you don´t know if your computer will surwive a standby/suspend do a hibernation write onto disk first, but then just suspend the machine. On wakeup, if the battery has still power it will resume from suspend (faster), if not and the battery has run out of energy, you will need to press the power button to turn on the computer again and on-reboot of the same OS-installation (don´t select Windows or another Linux installation at the boot manager) it will then perform a resume from hibernation mode. $ systemctl isolate graphical.target/network[-online].target/rescue.target/runlevel[0-6].target/default.target/basic.target, runlevel5.target ~ init 5, usually the graphical.target, runlevel3.target :usually~ network.target, where -online.target waits some time until found that the computer has been plugged into a network, runlevel1.target ~ rescue-target, runlevel2.target ~ multi-user.target([Ctrl][Alt][F1]-[Ctrl][Alt][F9] for switching the terminal screen, more than one terminal in parallel can be run, usually up to four terminals, the fifth is reserved for the GUI/ the X-server). $ find /usr/lib/systemd -name '*.target' # the two most important system configuration files cat /etc/fstab ... show what is mounted by default on boot time (editing is very dangerous!!) man fstab ... show help about it man -k fstab ... all manual entries about fstab ( (3) are C commands - you can not invoke them via the command line) [Alt][F2] ... execute a program by typing its name without the use of a shell/bash command line cat /etc/resolv.conf .... show which DNS name server is used to resolve names like www.elstel.org to ip addresses like 194.232.104.3 # networking iwconfig ... show wireless network interfaces iwlist em2 scanning ... search for wireless networks and their essid on interface wlan0 iwlist em2 scanning >myscanresult.txt ... delete and recreate file myscanresult.txt for viewing with less easier doable via GUI: wpa_supplicant -iem2 -Dwext -c wpa_timecapsule.conf ... connect to a wireless network also: echo "wpa_supplicant -iem2 -Dwext -c wpa_timecapsule.conf" >>run-wpa cat run-wpa chmod +x run-wpa ./run-wpa or install it for invocation from any directory mv run-wpa /usr/local/bin/ run-wpa ideally not needed: ndiswrapper ... use a Windows device driver for WLAN ___ now test the network: ifconfig em2 --- should show something like "inet 10.0.0.48" - that is your ip ip route show --- should show the ip of the router, fi.i: "default via 10.0.0.1" cat /etc/resolv.conf --- should show the ip of used nameservers, may be equal to the ip of the routers --- an example for this file is /etc/resolv.conf.orsn nslookup www.elstel.org .... resolve a domain name nslookup www.elstel.org 208.67.222.222 .... resolve a domain name with server 208.67.222.222 also: host www.elstel.org ___ ifconfig -a ... show local network interfaces and the ip addresses of these interfaces (lo is just a loopback and connects nowhere) ping www.elstel.org .... look whether that server responds to the ping, i.e. there is a connection to that ip/domainname ethtool em1 ... look whethere a network cable has been plugged in ip route show ... routing table: where network packets are routed to (router is default via ...) 10.0.0.0/24 ... means first 3 fields of the ip define the subnet: 3*8=24 10.0.0.0/255.255.255.0 ... means the same (netmask=255.255.255.0), 255=0xFF=2^8-1, 8bits=1Byte traceroute www.elstel.org ... how packets to elstel.org find their way through the internet you should not need: ip route add default via 10.0.0.1 (10.0.0.1 is router) you should not need: ifconfig em1 10.0.0.7 up (manually assign ip address 10.0.0.7) you should not need: dhclient -cf dhclient.conf em2 --- a program to find the ip address automatically systemctl -t service -a ... show all running services daemons netstat -atupn ... which programs/daemons do listen on the network Open/FreeBSD: sockstat -P tcp,udp -l rfkill ... unblock network interface / list blocking state of nw interfaces rfkill --help ... show help for rfkill rfkill -h ....... show help for rfkill rfkill --help | less ... show help for rfkill ip link show ... list network interfaces (new command) ip link ls [up] ip link set dev em1 up/down ... enable disable network interface ip addr ... show ip addresses ip addr add/del 10.0.0.3/8 dev em1 ... (un)assign IP address macchanger --another em1 ... use another hardware address to hide the identity of that notebook ip link set dev em1 address 00:80:c8:f8:bc:ef ... assign a hardware address manually ping 10.0.0.138 ... show whether host is reachable (via ICMP internet control message protocol) arping -I em1 -f 10.0.0.138 ... show whether the ARP (address resolution protocol) knows about the given IP address, ARP is based on the hardware address ip route show ip route add default via 10.0.0.138 ... add 10.0.0.138 as router route add default gw 10.0.0.138 ... does the same also on Open/FreeBSD Open/FreeBSD only: netstat -f inet -rn ... show routing table # run Qt Apps in compatibility mode (from a terminal): Elder computers with Nvidia graphics card were not sufficiently supported by the nouveau driver. The nouveau(:fr~new:en/neu:de) OSS-driver (open source software driver) did not implement graphics cards that had been sold before the starting-point of the nouveau project. Formerly only ATI- and compatible graphics cards had an OSS-driver, namely the driver being called ‘radeon’. Difference between the radeon and the nouveau project is, that the radeon driver is funded(fornecēr com moneda:pt) by the company which owns the ATI brand, while the nouveau project is truely oss also like se-considerou{:pt}/ one would consider/see{:en} a partir do{:pt}/ as seen by_the/from-thé · funding(funding (used as noun{:en}/ verwendet als Nomen/Hauptwort{:de}), - funded(participio do preterito/ participe) by multiple parties{:en}/ pelos partidas em muito ou mais como somente uma{:pt}. Generally speaking, most often one-is-stitched{:en}/se prega{:pt} em{:pt} jamar/ by calling{:en} OSS of what adheres to an OSS-compatible license. What may be/shall be allowed to call ‘open source’ is legitimated/endorsed by an instance like the OSI, open source intiative, found at the given web-page opensource.org. The ATI-brand is nowadays not owned by a company of the same name any more, it has been bought by AMD, a manufacturer of CPUs for PC-compatible computers considered a competitor of Intel (other/primary manufacturer of PC-compatible CPUs). _ PC = personal computer, computer not to use for business-only purposes or for large-scale scientific calculations, computer that everyone can/ shall be able to use CPU = central processing unit, every computer needs to have at least one; what does the calculations inside-of-a computer, running a CPU needs at least also memory to store and fetch from the data used to do the calculations on. RAM = random access memory, read/write in any order, just by an ‘address’, an ordinal number starting from zero, usually written as hex/ in the hexagesimal number system like 0xFFE8. ROM = read only memory, até um de assim usado em ascender um computador{:pt} ordinal number = whole number, a number used to order things, like primary, secondary, third; simply a whole number usually starting from zero or one, but also used for negative numbers where the starting point is, semantically speaking, the zero. semantics/semantically = what things mean{:en}/ o sentido das coisas{:pt}/ was e(twa)s bedeutet{:de}, at mathematics you only define how things are used and how to perform calculations on these, most or many-often-a-times · muitos sentidos darão se possivel{:pt}/ there are até{:pt} many different interpretations/use_cases possible{:en} · for one and the same (structure known from) mathematics. en:: noun: semantics, adjective: semantically, verb: (to) fund, past participle: funded de:: Hauptwort/Substantiv: Semantik, Eigenschaftswort/Adjektiv: semantisch, Verb/Tun·wort: fund{:en}, Partizip Perfekt: funded{:en} pt:: substantivo: (a) semântica, adjetivo: semântico, verbo: fund{:en}, particípio (passado): funded{:en} _ a.) LIBGL_ALWAYS_SOFTWARE=1 mageiawelcome b.) export LIBGL_ALWAYS_SOFTWARE=1 (inserted as first line of /etc/lxdm/Xsession) mageiawelcome --- see whether the variable is already set env | grep LIBGL --- compatibility mode may be required if there is no graphics acceleration, but not every time that you don´t have graphics acceleration/ direct rendering. # graphics acceleration: $ xdriinfo glx: failed to create dri2 screen failed to load driver: nouveau Screen 0: swrast ___ dri = direct rendering interface, rendering ~ to paint/output computer graphics test program: gears, gearbox, geartrain swrast = software rasterization, the screen is partitioned into a many of quadrats, where the graphics (output) operations are performed independently and most-desiredly in parallel (for to save time which makes things faster). glx = OpenGL extension to the X-windows system OpenGL, DirectX = interfaces in use for 3D-graphics and graphics acceleration; OpenGL is an open standard also but not only implemented by OSS/open_source operating systems, DirectX is an alternative to OpenGL under Windows, which is known to run faster unter this OS(operating system) X-windows: What is used for the GUI/ graphical/non-text-only output under Linux, *BSD and other OSS/open_source operating systems, sample programs installed até by default: xclock, xman, xterm, xmessage, xdpyinfo, xrandr, xauth, xhost, xprop, xwininfo, setxkbmap) GUI = graphical user interface, what has given its name to the ‘Windows’ operating system, although the first computers shipped with GUI were the very, very old Apple computers, I have seen one of this in my times of adolescense at a friend of mine; it had only black and white graphics but a GUI with janelas{:pt}/windows{:en}/Fenster{:de}. Under *DOS there was the GEM-GUI, long before the appearance of Windows 3.1. GEM as well as the known Modula-3 compilers operating systems: Linux, Windows, OpenBSD, (MS)DOS/PCDOS, CPM(what was used before MSDOS, no directories, only a root directory with files), MacOS(for Apple computers), Android(based on the Linux-kernel but for smartphones), Minix(a mini-Unix variant implemented by some university and the professor who did), Unix(what was there before Linux, *BSD, MacOS and the like, ancestor of all other Unix-variants: System-V Unix, pointOfProof: man shmat - manual page for shared-memory-at, says the program & its interface stem from System-V times), OS/2 was a 16-bit/32-bit operating system for PCs that appeared between DOS and Windows/Linux/*BSD, DOS is 16bit, current OSes are 64bit/32bit or até 64bit-only. programming languages: C (invented by Kerningham & Ritchie), Pascal(inevented & implemented by Nikolaus Wirth, a German university professor), C++ (C extended by what is needed for object-oriented programming), Python (an interpreted script programming language), Perl (used many, scripting language like Python, but elder), C# (an MS-extension of C, introduced with the .net-Framework), Fortran (a very old programming language, not used any more today; “Formula Translator”), Cobol (also very old and not used any more, “Common Business Language”, I don´t know if there is any affiliation with Augusta Ada Lovelace), Ada (programming language invented by Augusta Ada Lovelace, in mission of the US-military, supported nowadays also by oss-compilers like the gcc, was not used that much outside of where it was implemented/written, the (programming) language was implemented by a many other people, but not by Mrs. Ada Lovelace, personally) gcc = GNU C compiler, first and most well-supported compiler under (GNU) Linux, a compiler is what you need to translate your program code into a machine-readable form that you can start or execute on your computer. F.i. for a C-program the source code file would be called myprog.c, but the compiled program as you can use it in deed would be called myprog.exe, or under DOS myprog.com was possible when the program used no more than 64KB, .com to-my-knowledge is the old CPM executable format) interpreted language = a language that does not need to be translated into a machine-readable form, it is interpreted statement by statement as-is. However reading a program in textual form as written by a human, is time-costly, interpreted languages execute up to ten_times/10x slower than compiled programs. Languages like Perl or Python are called interpreted, command files used by user-shells like Bash, Csh, Ksh, Command.com(DOS) that normally/most_often execute commands as soon as the user enters them (used to change directories, let the files in a directory be displayed, start a program as the user wants to do so, and more a-thing2do), don´t do something very different when the commands come from a file instead of the user. Under DOS such command files had the file-ending .bat (batch processing), under OS/2 there was an own more extended .bat-kind of file type ending with .cmd (the so called Rexx programming language, under OSS there was regina, but I have never used it). DOS = disk operating system, in the times of MSDOS, PCDOS and CPM the operating system did not much more than to supply procedures/functions/interrupt_handlers that supported reading, writing, deleting and creating files and directories (singular:directory, only one) to the user program. Only one program could be executed at the time (called: ‘stack processing’ in opposition to parallel, concurrent or multi-user execution). PCDOS and MSDOS where the exactly same piece of software, but when sold by IBM they called it PCDOS, when sold via/by Microsoft it was named MSDOS. Nowadays there is open source alternative available called FreeDOS. The Russians had implemented a DOS compatible clone-OS merely by assembler language, called RTDOS, afaik non-free. IBM = International Business Machines; the company that had specified and produced the very first PCs, ‘personal computers’, it had a monopoly on the very of these, but the monopoly had failed/fallen~caiu{:pt}. afaik = as far as I know # using the Wifi manual invocation of wpa_supplicant is required as root (enter "su" to become root) leafpad wpa_timecapsule.conf ---- enter essid and password ./run-wpa ---- invokes wpa_supplicant when in /home/ritchel; see at networking below # installing ndiswrapper for Wifi __ ndiswrapper was used to run elder Wireless-LAN cards, if the Linux kernel does not/ did not supply a suitable kernel device driver. However only a few Windows device drivers work in-deed with ndiswrapper. Windows device drivers have ‘.inf’ as file extension/ending. first you need to be root; enter: su unzip 200711690944.zip cd Win2000_XP/Driver\ Files/NDIS5/ ndiswrapper -i net5211.inf ndiswrapper -m add line "ndiswrapper" to /etc/modprobe.preload add "blacklist ath5k" to /etc/modprobe.d/blacklist-mga.conf or a newly created .conf in that directory ... ath5k would have been the Linux kernel device driver, which either did not work or should have been replaced lsmod | grep -E "ndiswarpper|ath5k" ... look if any of either-or kernel modules have been loaded modprobe ... load a kernel module manually, rmmod ... remove a kernel module from memory if possible