Some useful Linux Hacks Last Updated : 24 Nov, 2022 Comments Improve Suggest changes 12 Likes Like Report Linux is the best-known and most-used open source operating system. As an operating system, Linux is software that sits underneath all of the other software on a computer, receiving requests from those programs and relaying these requests to the computer’s hardware. For the purposes of this page, we use the term “Linux” to refer to the Linux kernel, but also the set of programs, tools, and services that are typically bundled together with the Linux kernel to provide all of the necessary components of a fully functional operating system. Some people, particularly members of the Free Software Foundation, refer to this collection as GNU/Linux, because many of the tools included are GNU components. However, not all Linux installations use GNU components as a part of their operating system. Android, for example, uses a Linux kernel but relies very little on GNU tools. Here are some of my favorites LINUX HACKS (in no particular order) : Paste Code: Directly paste any code/text into terminal use Ctrl + Shift + v Sharing Server: You can make a quick HTTP server for sharing in Python 2 using following command: python -m SimpleHTTPServer Increase Speaker Volume: Increase the maximum volume of your speakers by a certain percentage (150 in this case) : pactl set-sink-volume 0 150% Fortune Messages: Make your terminal output you random fortune messages. On a ubuntu system do: sudo apt-get install fortune and add fortune to the last line of your .bashrc if you are using Bash (default in my linux distros ). If you love cows then you can install cowsay pipe the output of fortune to cowsay , add following line to the end of your .bashrc fortune | cowsay Starwars: Want to watch StarWars in terminal ? Just type: telnet towel.blinkenlights.nl Shorten Lengthy Command: Have a lengthy command and want to short it down ? Use aliases Add all aliases to your .bashrc so that they remain permanent. Like we used sudo apt-get install to install packages we can slim it done by defining an alias in our bashrc like alias install = 'sudo apt-get install' After saving the file and restarting the terminal you can do things like install cowsay fortune figlet instead of typing sudo apt-get install fortune figlet cowsay You can do it for many commands with the syntax alias short-name='long command'. # Notice there is no space between long command and equal sign ( = ) Plus some commands are pre-aliased like la is an alias for ls -a. You can this out by typing la in your terminal . Ping and traceroute together: Want to ping and traceroute/tracert at the same time. Use mtr Install it with sudo apt-get install mtr or if you aliased the command use install mtr . Usage mtr Download files: Want to download files with a specific pattern like: File1 at http://example.com/files/file1.zip File2 at http://example.com/files/file2.zip Use wget ( comes pre-installed on most distros ) as following wget Page on example.com Wget can be used for crawling and other awesome automated stuff. Download accelerator: Want a stable download accelerator use axel? Install with sudo apt-get install axel use as follows axel -a Enable Scroll lock: Scroll Lock is disabled by default in Linux Distros. Even though the Scroll Lock doesn’t serve much of a purpose in the modern day applications. But still we might need it for some purposes like toggling the back light on our illuminated keyboards. To enable scroll lock xmodmap -e 'add mod3 = Scroll_Lock' link Download files using the command line : This one is pretty common. wget is used to download files using the command line via HTTP, HTTPS and FTP. wget file.link where file.link is the link from where the file has to be downloaded. Download YouTube videos: You can also download YouTube videos straight from the command line using a package by the name of youtube-dl. First install the package using apt-get or pip sudo apt-get install youtube-dl OR sudo pip install youtube-dl Your package is ready to be used. You can now use it to download videos youtube-dl Youtube-link Change terminal look and feel: If you want to edit the way your terminal looks, or the font sizes and other features. You have two options. gsettings or dconf. In layman terms gsettings uses the command line whereas dconf uses a GUI called dconf-editor. First we need to install dconf. sudo apt-get install dconf-tools dconf-editor Be a bond: You want to look like a badass hacker ? (Kind of) Install hollywood, your terminal will split and look like you’re doing a lot of cool things sudo apt-add-repository ppa:hollywood/ppa sudo apt-get update sudo apt-get install hollywood sudo apt-get install byobu #Used to split your terminal, very useful Launch byobu then hollywood (just type byobu and hollywood) Current Weather: What about the knowing the current weather of any city around the world. In your terminal, just type: curl https://wttr.in/your_city_name and voila, weather for next 3 days displayed elegantly in your terminal. Same command at same time: Want to run a command you ran yesterday at a point of time? Try Ctrl-R(recursive search) and then type a subset of characters in your command and boom you accessed a recent history without pressing key many times. Thanks.. Create Quiz Comment V Vikas Acharya 12 Improve V Vikas Acharya 12 Improve Article Tags : Linux-Unix Explore Getting Started with LinuxIntroduction to Linux Operating System7 min readLINUX Full Form - Lovable Intellect Not Using XP2 min readDifference between Linux and Windows7 min readLinux Distributions6 min readDifference between Unix and Linux6 min readInstallation with LinuxInstallation of Arch Linux in VirtualBox4 min readFedora Linux Operating System5 min readHow to install Ubuntu on VirtualBox?6 min readHow to Install Linux Mint?3 min readInstallation of Kali Linux in Virtual Machine2 min readHow to Install Linux on Windows PowerShell Subsystem?2 min readHow to Find openSUSE Linux Version?2 min readInstallation of CentOS2 min readLinux CommandsLinux Commands15+ min readEssential Unix Commands7 min readFind Command in Linux with Examples7 min readLinux File SystemLinux File System12 min readLinux File Hierarchy Structure5 min readLinux Directory Structure6 min readLinux KernelLinux Kernel4 min readKernel in Operating System3 min readHow Linux Kernel Boots?11 min readDifference between Operating System and Kernel3 min readLinux Kernel Module Programming: Hello World Program7 min readLinux Loadable Kernel Module7 min readLoadable Kernel Module - Linux Device Driver Development4 min readLinux Networking ToolsNetwork configuration and troubleshooting commands in Linux5 min readHow to configure network interfaces in CentOS?5 min readCommand-Line Tools and Utilities For Network Management in Linux8 min readLinux - Network Monitoring Tools4 min readLinux ProcessProcesses in Linux/Unix5 min readHow to Manage Process in Linux4 min readGetting System and Process Information Using C Programming and Shell in Linux2 min readProcess states and Transitions in a UNIX Process4 min readLinux FirewallLINUX Firewall7 min readiptables command in Linux with Examples7 min readHow to Configure your Linux Firewall - 3 Methods12 min readShell Scripting & Bash ScriptingIntroduction to Linux Shell and Shell Scripting7 min readUnderstanding Terminal, Console, Shell and Kernel3 min readHow to Create a Shell Script in linux7 min readShell Scripting - Different types of Variables4 min readBash Scripting - Introduction to Bash and Bash Scripting12 min readBash Script - Define Bash Variables and its types12 min readShell Scripting - Shell Variables6 min readBash Script - Difference between Bash Script and Shell Script4 min readShell Scripting - Difference between Korn Shell and Bash shell3 min readShell Scripting - Interactive and Non-Interactive Shell3 min readShell Script to Show the Difference Between echo â$SHELLâ and echo â$SHELLâ4 min readLinux Administrator SystemWhat is Linux System Administration?6 min readBeginner's Guide to Linux System Administration5 min readHow to Monitor System Usage, Outages and Troubleshoot Linux Servers6 min readLinux - Systemd and its Components3 min readBoot Process with Systemd in Linux3 min readHow to Control Systemd Services on Remote Linux Server2 min readHow to Start, Stop and Restart Services in Linux Using systemctl Command9 min read Like