{"id":19227713,"url":"https://github.com/girish1729/75-linux-command-lines","last_synced_at":"2026-02-08T15:02:42.245Z","repository":{"id":61455562,"uuid":"551722912","full_name":"girish1729/75-linux-command-lines","owner":"girish1729","description":"75 Linux command lines","archived":false,"fork":false,"pushed_at":"2022-10-17T23:54:43.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T14:46:02.393Z","etag":null,"topics":["command-line","linux-shell","multimedia","tools","youtube-dl"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/girish1729.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-15T00:54:56.000Z","updated_at":"2022-10-18T00:13:56.000Z","dependencies_parsed_at":"2022-10-18T07:36:50.025Z","dependency_job_id":null,"html_url":"https://github.com/girish1729/75-linux-command-lines","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/girish1729/75-linux-command-lines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/girish1729%2F75-linux-command-lines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/girish1729%2F75-linux-command-lines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/girish1729%2F75-linux-command-lines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/girish1729%2F75-linux-command-lines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/girish1729","download_url":"https://codeload.github.com/girish1729/75-linux-command-lines/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/girish1729%2F75-linux-command-lines/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29234154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T14:18:14.570Z","status":"ssl_error","status_checked_at":"2026-02-08T14:18:14.071Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","linux-shell","multimedia","tools","youtube-dl"],"created_at":"2024-11-09T15:24:43.565Z","updated_at":"2026-02-08T15:02:37.231Z","avatar_url":"https://github.com/girish1729.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 50 interesting Linux command lines\n\n1. Convert CRLF terminated files to just CR\n\n```shell\n$ dos2unix file.txt\n```\n\n2. Check if JSON is valid\n\n```shell\n$ json_verify \u003c file.json\n```\n\n3. Same as above but prints out nicely.\n\n```shell\n$ jq \u003c file.json\n```\n\n4. Get rid of duplicate spaces occuring together\n\n```shell\n $ tr -s ' ' \u003c file.txt\n```\n\n5. Send mail from command line\n\n```shell\n$ mutt -s hi foo@yahoo.com \u003c /tmp/mail.txt\n```\n\n6. Move in bulk based on patterns\n\n```shell\n$ mmv -v '*' '#1.jpg'\n```\n\n7. Use interactive file deletion DOS style\n\t(midnight commander DOS style UI)\n\n```shell\n$ mc\n```\n\n\n8. Fancy list files (show dirs with /)\n\n```shell\n$ ls -F\n```\n\n9. Show a file with line numbers\n\n```shell\n $ cat -n file.txt\n```\n\n10. Use cut to split fields\n\n```shell\n $ echo 1:2:3 | cut -d: -f2\n```\n\n11. Edit file in place and do search and replace\n\n```shell\n $ perl -pi -e 's/old/new/' file.txt\n```\n\n12. Same as above but not in place\n\n```shell\n $ sed -e 's/old/new/' file.txt \u003e new.txt\n```\n\n13. Spidermonkey (interactive js shell)\n\n```shell\n$ js \n```\n\n```shell\n$ node\n```\n\n14. Simple video to audio conversion\n\n```shell\n $ ffmpeg -i file.mp4 song.mp3\n```\n15. Download youtube video to disk\n\n```shell\n $ youtube-dl https://youtu.be/XXXX\n```\n\n16. Same as above, faster\n\n```shell\n $ yt-dlp https://youtu.be/XXX\n```\n\n17. Show progress bar or ETA with pipeviewer\n\n```shell\n $ cat file.tgz | pv | tar zxpf\n```\n\n18. Play gif animation\n\n```shell\n $ mplayer file.gif\n```\n\n19. View image\n\n```shell\n $ qiv file.jpg\n```\n\n20. Same as above\n\n```shell\n $ qview file.webp\n```\n\n21. Same as above\n\n```shell\n $ xloadimage file.png\n```\n\n22.  Same as above\n\n```shell\n $ display file.png\n```\n\n\n23. Nice PDF viewer\n\n```shell\n $ mupdf file.pdf\n```\n\n24. Fire up a web server using current dir\n\n```shell\n $ http-server\n```\n\n25. Fire up web server to interpret markdown files\n\n```shell\n $ grip\n```\n\n26. Do a simple file upload to FTP or HTTP\n\n```shell\n $ curl -T file.input ftp://remote/dir/A\n```\n\n27. Do a fast download breaking file into chunks and fetch \n    using multiple TCP connections\n\n```shell\n $ axel \u003cURL\u003e\n```\n\n28. Figure out common lines\n\n```shell\n $ comm file.txt file2.txt\n```\n\n29. Compare binary files\n\n```shell\n $ diff a.bin b.bin\n```\n\n30.  Printout SHA256 fingerprint\n\n```shell\n $ openssl dgst sha256 \u003c file.txt\n```\n\n31. Same as above.\n\n```shell\nsha256sum \u003c file.txt\n```\n\n32. Always import fresh into git repo\n\n```shell\n $ find . -name .git | xargs rm -rf\n```\n\n33. Hear same song repeatedly\n\n```shell\n $ mplayer favsong.mp3 -loop 0\n```\n\n34. Watch video with vol boost, 0,9 for +,-\n\n```shell\n $ mplayer -softvol -softvol-max 1000 file.mp4\n```\n\n35. Listen to Internet radio on command line\n\n```shell\n $ mplayer \u003cshoutcast url\u003e\n```\n\n36. Resize image with ImageMagick\n\n```shell\n $ convert file.png -resize 500x500! small.png\n```\n\n37. Find out width and height\n\n```shell\n $ identify favicon.ico\n```\n\n38. Tell the length of media\n\n```shell\n $ mplayer -identify -frames 0 \u003cmedia\u003e\n```\n\n39. Nuke everthing in mp3 after 90 seconds\n\n```shell\n $ ffmpeg  -i file.mp3 -to 90 out.mp3\n```\n\n40. Get rid of first 30 seconds.\n\n```shell\n $ ffmpeg -i file.mp3 -ss 30 out.mp3\n```\n\n41. Convert a postscript file to PDF\n\n```shell\n $ ps2pdf14 file.ps\n```\n\n42. Create webp from png or jpg\n\n```shell\n $ cwebp file.png -o file.webp\n```\n\n43. Change image format\n\n```shell\n $ convert file.jpg file.png\n```\n\n44. Copy file.txt to paste buffer\n\n```shell\n $ cat file.txt| xsel\n```\n\n45. Take screenshot from command line\n\n```shell\n $ import f.png\n```\n\n46.  Scour entire file system for files\n\n```shell\n $ locate file\n```\n\n47. Look for pattern recursively and ignore case\n\n```shell\n $ grep -ir pat dir/\n```\n\n48. Get rid of newline whilst printing\n\n```shell\n $ echo -n text\n```\n\n49. Batch top output\n\n```shell\n top -b\n```\n\n50. Show speed of download/upload\n\n```shell\n$ ifstat\n```\n51. Find directories and nuke them\n\n```shell\n$ find . -name mango -type d | xargs rm -rf\n```\n\n52. Prints random quote or cookie\n\n```shell\n$ fortune\n```\n\n53. Compress files using zstd\n```shell\n$ zstd file.bin\n```\n\n54. Decompress using zstd\n```shell\n$ unzstd compressed.zstd\n```\n\n55. Record screencast video\n```shell\n$ peek\n```\n\n56. Download youtube video in mp4\n```shell\n$ yt-dlp -f mp4 https://youtu.be/XXXXX\n```\n\n57. FTP client with superpowers\n```shell\n$ lftp \u003cURL\u003e\n```\n\n58. Show statistics and counters\n```shell\n$ conky\n```\n\n59. Show bandwidth usage\n```shell\n$ ifstat -b\n```\n\n60. Start a TCP server at port 1234\n```shell\n$ nc -l -p 1234\n```\n\n61. Connect to server using netcat\n```shell\n$ nc 127.0.0.1 1234\n```\n\n62. Generate strong password\n```shell\n$ pwgen\n```\n\n63. Generate lookalike domains\n```shell\n$ dnstwist google.com\n```\n\n64. anagram generator\n```shell\n$ an mango\n```\n\n65. Profile execution of a program\n```shell\n$ time \u003ccmd\u003e\n```\n\n66. Save changes to disk\n```shell\n$ sync\n```\n\n67. Figure out USB or SSD or HDD performance\n```shell\n$ iostat\n```\n\n68. Find out bandwidth between two point\n```shell\n$ bing host1 host2\n```\n\n69. Scan for machines in local network\n```shell\n$ fping -g 192.168.1.0/24\n```\n\n70. Colored less\n```shell\n$ most \u003cfile\u003e\n```\n\n71. JSON power tool\n```shell\n$ jq\n```\n\n72. YAML power tool\n```shell\n$ yq\n```\n\n73. Search for man pages\n```shell\n$ apropos string\n```\n\n74. Indent javascript\n```shell\n$ js-beautify file.js\n```\n\n75. Capture screenshot\n```shell\n$ sleep 3; import foo.png\n```\n\n\n## Download this cheatsheet PDF\n\n[Gumroad download](https://girish1729.gumroad.com/l/50-linux-command-lines)\n\n## Tweet this to your followers\n\n\n\u003ca href=\"https://twitter.com/intent/tweet?text=Tweet+this\u0026url=https%3A%2F%2Fgithub.com%2Fgirish1729%2F50-linux-command-lines\u0026hashtags=twitter\u0026original_referer=http%3A%2F%2Fgithub.com%2F\u0026tw_p=tweetbutton\" target=\"_blank\"\u003e\n  \u003cimg src=\"http://jpillora.com/github-twitter-button/img/tweet.png\"\n       alt=\"tweet button\" title=\"Tweet this\"\u003e\u003c/img\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgirish1729%2F75-linux-command-lines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgirish1729%2F75-linux-command-lines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgirish1729%2F75-linux-command-lines/lists"}