background preloader

An A-Z Index of the Bash command line for Linux

Commands marked • are bash built-ins Many commands particularly the Core Utils are also available under alternate shells (C shell, Korn shell etc). More bash commands: Linux Command Directory from O'Reilly, GNU CoreUtils.SS64 bash discussion forumLinks to other Sites, books etc

https://ss64.com/bash/

Related:  Linux

Using SSH keys for Password-less Logins Most people start using SSH by logging in with a password, but re-entering your password for every SSH connection quickly becomes tedious. A better way is to set up a public/private key pair - you unlock your key once and then reuse it to make connections without entering your password. It may sound a bit complicated but you can set it up with two simple commands* ssh-keygen ssh-copy-id hostname You run the first command once to set up your public/private key pair and then you run the second command once for each host you want to connect to. These steps are spelled out in more detail below, but those two commands are all you need to get going. * This guide assumes you're running GNOME on a modern desktop Linux distribution such as Ubuntu, Debian, Fedora etc. Step 0: Think of a password Before we start with step 1, you'll need to think of a password. It's always difficult to think up a new password. Step 1: Generate a key pair ssh-keygen You'll be prompted for a filename - just press Enter.

How to kill a TCP connection using netstat Linux: How to kill a TCP connection using netstat? You cannot kill a TCP connection using netstat utility. netstat is use for Display network connectionsRouting tablesInterface statisticsMasquerade connectionsMulticast memberships And much more However Linux support two other commands or utility that can be used to kill a TCP connection. tcpkill command Use tcpkill command to kill specified in-progress TCP connections. Syntax: tcpkill -i eth0 { expression } Examples: (a) Kill all outgoing ftp (port 21) connection: tcpkill -i eth0 port 21 (b) Kill all all packets arriving at or departing from host 192.168.1.2 (host12.nixcraft.com) tcpkill host 192.168.1.2 tcpkill host host12.nixcraft.com (c) To kill all IP packets between 192.168.1.2 and any host except 192.168.1.111, type the following: tcpkill ip host 192.168.1.2 and not 192.168.1.111 Since tcpkill expressions are based upon tcpdump command's filter expression, it is recommended that you read options with expression and examples. cutter command

Main Page Linux tips every geek should know What separates average Linux users from the super-geeks? Simple: years spent learning the kinds of hacks, tricks, tips and techniques that turn long jobs into a moment's work. If you want to get up to speed without having to put in all that leg-work, we've rounded up over 50 easy-to-learn Linux tips to help you work smarter and get the most from your computer. Enjoy! UPDATE: If these tips aren't enough and you want even more, make sure you check out More Linux tips every geek should know! #1: Check processes not run by you Difficulty: Expert Application: bash Imagine the scene - you get yourself ready for a quick round of Crack Attack against a colleague at the office, only to find the game drags to a halt just as you're about to beat your uppity subordinate - what could be happening to make your machine so slow? OK, let's list all the processes on the box not being run by you! ps aux | grep -v `whoami` Or, to be a little more clever, why not just list the top ten time-wasters: find . reset

Pinguy OS What Is Btrfs Filesystem (and Why Is It Better Than Ext4)? There is more to a hard drive than its size. While the amount of disk space is all you see marketed about a hard drive on a sales page, there is actually an extensive amount of coding that goes into making a hard drive capable of handling your applications and data in the first place. Most Linux distributions currently default to using the ext4 file system, but the future for many of them lies with the B-tree file system, better known as Btrfs. To put it simply, a file system is how a hard drive is able to store, access, and manage files. While different operating systems can run off of the same hard drive, they tend not to share the same file system. Btrfs is a modern file system that began development back in 2007. Btrfs is not a successor to the default Ext4 file system used in most Linux distributions, but it can be expected to replace Ext4 in the future. Btrfs is expected to offer better scalability and reliability. Stability implies that something is unchanging.

10 tips on working fast in UNIX or Linux 10 tips for working fast in UNIX Have you ever amazed to see someone working very fast in UNIX, firing commands and doing things in mille seconds? Yes I have seen and I have always inspired to learn from those gems of guys. This article or tutorial or whatever you call it I have dedicated to share UNIX command practices I follow to work fast, quick or efficiently in UNIX. I work for financial services industry and my work involves development and support of online stock and futures trading application in Electronic trading, Derivatives etc. all our services runs of UNIX servers so its very important for me to work efficiently and quickly in Linux machine. This article is in continuation of my earlier article Top 10 basic networking Commands in Unix and Top 10 most useful CVS command in Unix and 10 examples of using find command in UNIX . if you have not read those you can see if you find them interesting and useful. 1) Use ! 2) use !! 5) Using regular expression in grep and find.

Dossier - Où en est le HTML5 ? Petite histoire et promesses d'une évolution majeure du Web Dossier HTML5 - Plus de 10 ans après la publication de la norme HTML4, son successeur HTML5 promet de révolutionner notre usage du Web. Rétrospective et tour des attentes avec Tristan Nitot, président de Mozilla Europe et Daniel Glazman, cochairman du groupe de travail CSS au W3C.Lire l'article (volet 1) Une nouvelle porte pour les applications riches sur le Web Dossier HTML5 - Recours moindre aux images, affichage uniforme sur tous les navigateurs, applications riches (RIA) sans plugins tiers... De nouveaux outils pour la sémantique et le référencement Dossier HTML5 - Par l’ajout de nouvelles balises et d’un nouveau format de métadonnées, HTML5 compte améliorer son approche de la sémantique, nouvel axe de développement du référencement. Le remplaçant de Flash sur la vidéo ? Dossier HTML5 - Depuis plusieurs mois, le glas de Flash sur le terrain de la vidéo est régulièrement sonné avec l'arrivée de HTML5.

UNIX tips: Learn 10 good UNIX usage habits Break bad UNIX usage patterns Michael StutzPublished on December 12, 2006 When you use a system often, you tend to fall into set usage patterns. Sometimes, you do not start the habit of doing things in the best possible way. Adopt 10 good habits Ten good habits to adopt are: Make directory trees in a single swipe Listing 1 illustrates one of the most common bad UNIX habits around: defining directory trees one at a time. Listing 1. It is so much quicker to use the -p option to mkdir and make all parent directories along with their children in a single command. Listing 2. You can use this option to make entire complex directory trees, which are great to use inside scripts; not just simple hierarchies. Listing 3. In the past, the only excuse to define directories individually was that your mkdir implementation did not support this option, but this is no longer true on most systems. Change the path; do not move the archive Listing 4. Combine your commands with control operators Listing 5.

Linux Directory Structure (File System Structure) Explained with Examples by Ramesh Natarajan on September 8, 2010 Have you wondered why certain programs are located under /bin, or /sbin, or /usr/bin, or /usr/sbin? For example, less command is located under /usr/bin directory. Why not /bin, or /sbin, or /usr/sbin? What is the different between all these directories? In this article, let us review the Linux filesystem structures and understand the meaning of individual high-level directories. 1. / – Root Every single file and directory starts from the root directory.Only root user has write privilege under this directory.Please note that /root is root user’s home directory, which is not same as /. 2. Contains binary executables.Common linux commands you need to use in single-user modes are located under this directory.Commands used by all the users of the system are located here.For example: ps, ls, ping, grep, cp. 3. 4. 5. Contains device files.These include terminal devices, usb, or any device attached to the system.For example: /dev/tty1, /dev/usbmon0 6. 7. 8. 9.

VirtualBox VirtualBox 5.1.12 for Linux ¶ Note: The package architecture has to match the Linux kernel architecture, that is, if you are running a 64-bit kernel, install the appropriate AMD64 package (it does not matter if you have an Intel or an AMD CPU). Mixed installations (e.g. Debian/Lenny ships an AMD64 kernel with 32-bit packages) are not supported. To install VirtualBox anyway you need to setup a 64-bit chroot environment. The VirtualBox base package binaries are released under the terms of the GPL version 2. Please choose the appropriate package for your Linux distribution: You might want to compare the SHA256 checksum or the MD5 checksum to verify the integrity of downloaded packages. Oracle Linux ¶ Users of Oracle Linux 5, 6 and 7 can use the public yum repository and enable the el5_addons (OEL5), the ol6_addons (OL6) or the ol7_addons (OL7). yum install VirtualBox-5.1 to the latest maintenance release of VirtualBox 5.0.x. Debian-based Linux distributions ¶ You can add these keys with

How to monitor your Linux machine with netstat Netstat is an extremely useful Linux command line tool that allows you to check which service is connecting to a port on your machine. It is very useful to analyze what’s going on on your machine when you are facing or trying to to prevent an attack on it. You can find information such as how many connection are being made on a port, which IP addresses these connections originate from, and much more. Netstat ships with most distributions of Linux so it should already be installed on yours. Launch a shell terminal on your machine and run the following command: # netstat -ant Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 ::ffff:192.168.1.19:80 ::ffff:192.168.1.240:63049 TIME_WAIT tcp 0 0 ::ffff:192.168.0.19:80 ::ffff:192.168.1.240:62793 TIME_WAIT tcp 0 0 ::ffff:192.168.1.19:80 ::ffff:192.168.1.240:62795 TIME_WAIT The output will most likely be very long. # netstat -ant | grep 80 # netstat -ant | grep 80 | wc -l 625

Related:  COMPUTING SITESdboy626linuxProgrammationlinuxNerd SchoolOnline servicessLinuxbasicsUbuntuLinux_UnixLinuxLinuxComputer and Information Technology IIstumbleupon 3Bash/CLIUbuntuOnline ResourcesLinuxGNU/LinuxBashLinuxlinuxUnixUsefulSites