<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: PuTTYgen</title>
    <description>The latest articles on DEV Community by PuTTYgen (@puttygen).</description>
    <link>https://dev.to/puttygen</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F211459%2F8ca63793-61c3-4dfd-92bb-96131877c073.jpg</url>
      <title>DEV Community: PuTTYgen</title>
      <link>https://dev.to/puttygen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/puttygen"/>
    <language>en</language>
    <item>
      <title>Top Linux Commands</title>
      <dc:creator>PuTTYgen</dc:creator>
      <pubDate>Tue, 13 Aug 2019 09:16:58 +0000</pubDate>
      <link>https://dev.to/puttygen/top-linux-commands-550c</link>
      <guid>https://dev.to/puttygen/top-linux-commands-550c</guid>
      <description>&lt;p&gt;Linux is one of the most popular operating systems with an extensive user-base around the world, most commonly programmers and developers. The open-source Unix-like operating system (OS) is rooted from the Linux kernel - an operating system developed by Linus Torvalds.&lt;/p&gt;

&lt;p&gt;The Linux operating system has countless commands but today we are only going to look at top &lt;a href="https://www.puttygen.com/linux-commands"&gt;linux commands&lt;/a&gt; that are frequently used by programmers. The best part of it is that it makes it easy to complete any task.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;ls&lt;/strong&gt; Directory listing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ls -al&lt;/strong&gt; Formatted listing with hidden files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ls -lt&lt;/strong&gt; Sorting the Formatted listing by time modification&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cd dir&lt;/strong&gt; Change directory to dir&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cd&lt;/strong&gt; Change to home directory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pwd&lt;/strong&gt; Show current working directory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;mkdir&lt;/strong&gt; dir Creating a directory dir&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cat &amp;gt;file&lt;/strong&gt; Places the standard input into the file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;more file&lt;/strong&gt; Output the contents of the file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;head file&lt;/strong&gt; Output the first 10 lines of the file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tail file&lt;/strong&gt; Output the last 10 lines of the file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tail -f&lt;/strong&gt; file Output the contents of file as it grows,starting with
the last 10 lines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;touch file&lt;/strong&gt; Create or update file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;rm file&lt;/strong&gt; Deleting the file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;rm -r dir&lt;/strong&gt; Deleting the directory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;rm -f file&lt;/strong&gt; Force to remove the file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;rm -rf dir&lt;/strong&gt; Force to remove the directory dir&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cp file1 file2&lt;/strong&gt; Copy the contents of file1 to file2&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cp -r dir1 dir2&lt;/strong&gt; Copy dir1 to dir2;create dir2 if not present&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;mv file1 file2&lt;/strong&gt; Rename or move file1 to file2,if file2 is an existing directory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ln -s file&lt;/strong&gt; link Create symbolic link link to file&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Process management commands
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;ps&lt;/strong&gt; To display the currently working processes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;top&lt;/strong&gt; Display all running process
Unix/Linux Command Reference &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;kill pid&lt;/strong&gt; Kill the process with given pid&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;killall proc&lt;/strong&gt; Kill all the process named proc&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pkill pattern&lt;/strong&gt; Will kill all processes matching the pattern&lt;/li&gt;
&lt;li&gt;**bg List stopped or background jobs, resume a stopped job in the background&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;fg&lt;/strong&gt; Brings the most recent job to the foreground&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;fg n&lt;/strong&gt; Brings job n to the foreground&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  File permission commands
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;chmod octal file&lt;/strong&gt; Change the permission of file to octal,which can
be found separately for user,group,world by adding,
• 4-read(r)
• 2-write(w)
• 1-execute(x)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Searching commands
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;grep pattern file&lt;/strong&gt; Search for pattern in file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;grep -r pattern dir&lt;/strong&gt; Search recursively for pattern in dir&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;command | grep pattern&lt;/strong&gt; Search pattern in the output of a command&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;locate file&lt;/strong&gt; Find all instances of file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;find . -name filename&lt;/strong&gt; Searches in the current directory (represented by a period) and below it, for files and directories with names starting with a filename&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pgrep pattern&lt;/strong&gt; Searches for all the named processes , that matches with the pattern and, by default, returns their ID&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  System Info Commands
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;date&lt;/strong&gt; Show the current date and time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cal&lt;/strong&gt; Show this month's calender&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;uptime&lt;/strong&gt; Show current uptime&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;w&lt;/strong&gt; Display who is on line&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;whoami&lt;/strong&gt; Who you are logged in as Unix/Linux Command Reference &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;finger user&lt;/strong&gt; Display information about user&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;uname -a&lt;/strong&gt; Show kernel information&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cat /proc/cpuinfo&lt;/strong&gt; Cpu information&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cat proc/meminfo&lt;/strong&gt; Memory information&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;man command&lt;/strong&gt; Show the manual for command&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;df&lt;/strong&gt; Show the disk usage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;du&lt;/strong&gt; Show directory space usage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;free&lt;/strong&gt; Show memory and swap usage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;whereis app&lt;/strong&gt; Show possible locations of app&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;which app&lt;/strong&gt; Show which applications will be run by default&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Compression Commands
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;tar cf file.tar file&lt;/strong&gt; Create tar named file.tar containing file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tar xf file.tar&lt;/strong&gt; Extract the files from file.tar&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tar czf file.tar.gz files&lt;/strong&gt; Create a tar with Gzip compression&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tar xzf file.tar.gz&lt;/strong&gt; Extract a tar using Gzip&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tar cjf file.tar.bz2&lt;/strong&gt; Create tar with Bzip2 compression&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tar xjf file.tar.bz2&lt;/strong&gt; Extract a tar using Bzip2&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;gzip file&lt;/strong&gt; Compresses file and renames it to file.gz&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;gzip -d file.gz&lt;/strong&gt; Decompresses file.gz back to file&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Network Commands
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;ping host&lt;/strong&gt; Ping host and output results&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;whois domain&lt;/strong&gt; Get whois information for domains&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;dig domain&lt;/strong&gt; Get DNS information for domain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;dig -x host&lt;/strong&gt; Reverse lookup host&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;wget file&lt;/strong&gt; Download file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;wget -c file&lt;/strong&gt; Continue a stopped download&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The article covers most of the basic Linux commands that one will come across. There are various other commands, but commonly the above listed 50 Linux commands will do the job.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>commands</category>
      <category>unix</category>
    </item>
  </channel>
</rss>
