Designed for the new command line user, this 555-page volume coversthe same material as LinuxCommand.org but in much greater detail. Inaddition to the basics of command line use and shell scripting, TheLinux Command Line includes chapters on many common programs used onthe command line, as well as more advanced topics.
In this 250+ page sequel/suplement to The Linux Command Line we'lllook at even more cool tools and fun command line topics. With 14 action-packedchapters, it's perfect for makers, students, and anyone wanting to learnadditional Linux history, techniques, and skills.
This chapter describes the basic features of the GNUcommand line editing interface.Command line editing is provided by the Readline library, which isused by several different programs, including Bash.Command line editing is enabled by default when using an interactive shell,unless the --noediting option is supplied at shell invocation.Line editing is also used when using the -e option to theread builtin command (see Bash Builtin Commands).By default, the line editing commands are similar to those of Emacs.A vi-style line editing interface is also available.Line editing can be enabled at any time using the -o emacs or-o vi options to the set builtin command(see The Set Builtin), or disabled using the +o emacs or +o vi options to set.
The Linux Command Line takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell (or command line). Along the way you'll learn the timeless skills handed down by generations of experienced, mouse-shunning gurus: file navigation, environment configuration, command chaining, pattern matching with regular expressions, and more.
Once you overcome your initial "shell shock," you'll find that the command line is a natural and expressive way to communicate with your computer. Just don't be surprised if your mouse starts to gather dust.
William Shotts has been a software professional for more than 30 years and an avid Linux user for more than 20 years. He has an extensive background in software development, including technical support, quality assurance, and documentation. He is also the creator of LinuxCommand.org, a Linux education and advocacy site featuring news, reviews, and extensive support for using the Linux command line.
This part covers filesystem navigation, files, directories, commands, redirection, permissions, processes, and keyboard shortcuts. This first 100 pages is where new sysadmins need to spend their time learning and reviewing. This is where you learn to interact with Linux and get to know it. This section describes how to handle most of what a sysadmin does from a mechanical point-of-view. In other words, this is your day-to-day section. Learn it.
Shotts walks you through exploring your environment, which includes environment variables, startup scripts, and editing those files and variables. Also included here is a so-called gentle introduction to the vi editor. The vi editor is historically the editor on *nix systems. You should learn it to gain credibility in *nix circles. Any sysadmin worth their salary knows vi. Sure, you can venture out to others such as emacs or various graphical editors, but vi is or should be, your "Go To" command-line editor. Finally, the author teaches you how to customize your shell prompt. You can get pretty fancy, and some people love to create cool shell prompts. Personally, I stick with the default one.
The author dedicated more than 100 pages to this section and deservedly so. Shell scripting is what separates wannabe Linux administrators from real Linux administrators. It's no longer about knowing some trivia or typing commands at a prompt, but now it's about making the system work for you. Shell scripting is an advanced skill that you need to acquire, and that's why Shotts used so many pages for it.
In some sense Linux is "all terminal", that is, the GUI runs atop the command line. If you remember the Windows 3.1-era, you'd boot your computer to DOS and then run Windows as a command, it's much the same with Linux today. The desktop that most distros run (KDE, GNOME) is just another program like, for example, Firefox.
Since a desktop environment is running "atop" the command line, you can also grab an already-running terminal by pressing Ctrl+Alt+F1, that is press Control, Alt and the F1 key at the same time. To get back to the graphical session, press Ctrl+Alt+F7.
To answer your question then, any type of linux will do, but since you haven't any interest in running a desktop environment, you can safely get any "server" type of distro, Ubuntu Server, for example.
We explained how to find and display the OS version on Linux. The safest option is to query /etc/os-release file using grep or cat command. Systemd based Linux distro users can use the hostnamectl command.
I have python3.10 on CentOS and command line editing and history recall doesn't work within the interactive python shell. (It does in python2 which is also installed as it is necessary for lots of system related scripts.) I also have python3.6 on an older CentOS where it also works fine.
(Optional) The following command block downloads and installs the AWS CLI without first verifying the integrity of your download. To verify the integrity of your download, use the below step by step instructions.
To update your current installation of the AWS CLI, add your existing symlink and installer information to construct the install command using the --bin-dir, --install-dir, and --update parameters. The following command block uses an example symlink of /usr/local/bin and example installer location of /usr/local/aws-cli.
For a specific version of the AWS CLI, append a hyphen and the version number to the filename. For this example the filename for version 2.0.30 would be awscli-exe-linux-x86_64-2.0.30.zip.sig resulting in the following command:
For a specific version of the AWS CLI, append a hyphen and the version number to the filename. For this example the filename for version 2.0.30 would be awscli-exe-linux-aarch64-2.0.30.zip.sig resulting in the following command:
Unzip the installer. If your Linux distribution doesn't have a built-in unzip command, use an equivalent to unzip it. The following example command unzips the package and creates a directory named aws under the current directory.
When updating from a previous version, the unzip command prompts to overwrite existing files. To skip these prompts, such as with script automation, use the -u update flag for unzip. This flag automatically updates existing files and creates new ones as needed.
Run the install program. The installation command uses a file named install in the newly unzipped aws directory. By default, the files are all installed to /usr/local/aws-cli, and a symbolic link is created in /usr/local/bin. The command includes sudo to grant write permissions to those directories.
Due to standard user permissions, after the installer finishes, you must manually create a symlink file in your $PATH that points to the aws and aws_completer programs by using the following commands at the command prompt. If your $PATH includes a folder you can write to, you can run the following command without sudo if you specify that folder as the target's path. If you don't have a writable folder in your $PATH, you must use sudo in the commands to get permissions to write to the specified target folder. The default location for a symlink is /usr/local/bin/.
If you have sudo permissions, you can install the AWS CLI for all users on the computer. We provide the steps in one easy to copy and paste group. See the descriptions of each line in the following steps.
Run the standard macOS installer program, specifying the downloaded .pkg file as the source. Use the -pkg parameter to specify the name of the package to install, and the -target / parameter for which drive to install the package to. The files are installed to /usr/local/aws-cli, and a symlink is automatically created in /usr/local/bin. You must include sudo on the command to grant write permissions to those folders.
To specify which folder the AWS CLI is installed to, you must create an XML file with any file name. This file is an XML-formatted file that looks like the following example. Leave all values as shown, except you must replace the path /Users/myusername in line 9 with the path to the folder you want the AWS CLI installed to. The folder must already exist, or the command fails. The following XML example, named choices.xml, specifies the installer to install the AWS CLI in the folder /Users/myusername, where it creates a folder named aws-cli.
Download the pkg installer using the curl command. The -o option specifies the file name that the downloaded package is written to. In this example, the file is written to AWSCLIV2.pkg in the current folder.
Because standard user permissions typically don't allow writing to folders in your $PATH, the installer in this mode doesn't try to add the symlinks to the aws and aws_completer programs. For the AWS CLI to run correctly, you must manually create the symlinks after the installer finishes. If your $PATH includes a folder you can write to and you specify the folder as the target's path, you can run the following command without sudo. If you don't have a writable folder in your $PATH, you must use sudo for permissions to write to the specified target folder. The default location for a symlink is /usr/local/bin/. Replace folder/installed with the path to your AWS CLI installation.
ffe2fad269