![]() If that’s the command you’re looking for, hit the right arrow key to accept and then hit Enter. For example, if I start typing ssh, fish will complete the command with the most recent matching entry from bash history ( Figure 2 ).įigure 2: Fish makes great use of the Bash history. You will see that fish does a great job of completing the command, bashed on your history. The best way to do this is to start typing a command. How do you do that? Type the command fish and you will see your prompt change ( Figure 1 ).įigure 1: Your change may be dramatic or subtle, depending on how you have your Bash prompt configured.Īt this point, you’re ready to start using fish. To make use of fish, you have to enter the fish prompt. That’s because you’re still in your bash prompt. You’re at the Bash prompt, with fish installed, and you have no idea how to make use of it. That’s it fish is now installed and ready to serve. ![]() Install fish with the command sudo apt-get install fish Update apt with the command sudo apt-get update The installation for Elementary OS (as well as most Debian-based systems) is as follows:Īdd the necessary repository with the command sudo apt-add-repository ppa:fish-shell/release-2 I will be demonstrating the installation on Elementary OS, so the installation for your distribution will vary (you can get instructions for all the supported platforms from the fish main page ). Installationįish can be installed on Ubuntu, Debian, Fedora, RHEL, openSUSE, CentOS, Arch Linux, Gentoo Linux, and even mac OS and Windows. I’m going to walk you through the installation and usage of the fish shell once you’ve started using this handy tool, chances are you’ll never go back to the standard old Linux shell again. Fish is a friendly, interactive shell that can be installed on your Linux machine and features: What if I told you there was a much, much, much easier way? There is, and it’s called fish. ![]() Or, you can, at the command prompt, simply start tapping the up arrow on your keyboard until you land on the command you need. You can comb through that, find the command you need, copy it, and then paste it back into the prompt. The history command is, in fact, a great way to see what commands you’ve issued. The X is determined within the ~/.bashrc file, in the line: HISTSIZE=1000 By typing the command history, you are presented with the last X amount of command you have run on the system. What do you do? Most Linux admins would immediately tell you to look to your Bash history and that would be sage advice. Or, maybe you recently secure shelled into a server, but don’t recall the IP address off hand. sports 22,80,443 -m state -state ESTABLISHED -j ACCEPT You may have to issue the command: iptables -A OUTPUT -o eth0 -p tcp -m multiport When you take into consideration how complicated those commands can get, it’s understandable that some admins have trouble recalling what they have done or need to do at the Bash prompt. However, along with that power comes the need to remember those commands. With the power of commands at your fingertips, there’s very little you cannot do. The Linux command line is a tool that every system administrator should get to know.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |