Tag: Linux cli

  • Linux Check Disk Space Commands

    Linux Check Disk Space Commands

    How to check disk space in Linux command line. The command df shows you free disk space and du returns the disk usage statistics for various files and folders. df command The df command shows disk usage statistics and it stands for “Disk Free”. The df command bellow without any options will return the disk […]

  • How to Remove Directory in Linux

    How to Remove Directory in Linux

    How to Remove or Delete Directory in Linux To delete a directory in Linux remove command to use is rm or rmdir. Both work fine but there is an important difference between how rm and rmdir remove a directory. Caution If you delete a directory from the GUI even in Linux, the folder is moved […]

  • How to Compress and Extract Files using the tar command on Linux

    How to Compress and Extract Files using the tar command on Linux

    How to Compress and Extract Files using the tar command on Linux and How to create tar.gz file in Linux command line Compress files The tar command is used to pack and compress files and directories on Linux. The archived files are usually named .tar.gz or .tgz and are called usually tarballs. As with many […]

  • Linux how o set environment variable

    Linux how o set environment variable

    Linux how o set environment variable How to set environment variable in Linux. Set environment variables in Linux To set a new environment variable, use the export command. For example to set the environment variable called TEST_HOME you can run this command. This prints the value of the variable you set earlier. Unsetting an environment […]

  • How to create a file in Linux using Terminal

    How to create a file in Linux using Terminal

    How to create a file in Linux using Terminal or SSH How to create a file in Linux using Terminal, Command line interface or SSH. There are a few ways to create a new empty file or redirect the output of a command to a new file. To create an empty file, any of these […]

  • Secret Lesser known useful Linux commands

    Secret Lesser  known useful Linux commands

    tree The tree command will list you directory, files and sub folders contents in an easy to see way. No need for repeated ls commands. This can be useful to get an overview of all subfolders of the target directory. pstree Tree but for precesses. Shows what processes originate from other processes. kill -15 SIGTERM […]

  • Commands any Linux Sysadmin should learn first

    Commands any Linux Sysadmin should learn first

    Commands any Linux Sysadmin should learn first. These are the commands any Linux Sysadmin should learn first. These are some of the most useful commands for system administration and devops on Linux. They are command line tolls because most of the actions on system administration you would want to be automated and scheduled uptime Time […]

  • How to zip and unzip files and folders in Linux

    How to zip and unzip files and folders in Linux

    How to zip and unzip files and folders in Linux Install Zip Unzip Install on RHEL, Centos, Fedora, Rocky Linux, etc. Install on Debian, Ubuntu, etc. Using zip and unzip to compress and extract files and folders. Current directory contents, files and one sub folder. Zip files and directories recursively This creates the zip file, […]

  • How to find a file in Linux

    How to find a file in Linux

    There are a few ways to find a file in Linux.  The most used way is in Terminal as this can become part of a script very easily and automate tasks on a Linux server. If you are using a desktop environment such as Gnome or Kde, the search for files is as simple as […]

  • How to delete a directory in Linux

    How to delete a directory in Linux

    To delete a directory in Linux in a desktop environment is easy as pressing the Del / Delete key. To delete a directory in Linux using command line CLI in Terminal or SSH you can use the rm command. The bellow works fine for a file. A directory cannot be removed just like that. The […]