what is the equivalent to cmd.exe in linux?
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    Obocaman Guest

    what is the equivalent to cmd.exe in linux?

    My question is whether I can ldo something like nc -l -p [port] -t -e cmd.exe with a Linux system. If it can be done, then what is the equivalent to cmd.exe in linux (the terminal) and how do I invoke it. If it can't, why is that so?

    Thank you.

  2. #2
    Join Date
    Apr 2004
    Location
    Euregio
    Posts
    3,612
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am very sorry, I am not very used to Windows, so I don't have an idea what this command does, maybe you can explain it and I might tell you a Linux alternative.

    //edit:
    Ok, found something :
    http://www.liutilities.com/products/...sslibrary/cmd/

    There are different prompts. The one used default in fedora is
    /bin/bash
    there is also
    /bin/bsh
    and also
    /bin/csh

    //2nd edit:
    If you want to use the prompt from a remote machine better use telnet or ssh. (Ssh is the best, because it is not plain text, but crypted)
    Last edited by ilja; 5th October 2004 at 07:11 PM.

  3. #3
    Obocaman Guest
    Thank you for repplying,
    I have tried nc -l -p 53 -t -e /bin/csh but netcat doesn't understand the command.
    Basically what I want is to know how to listen on any port with netcat so I it will give the client a shell.
    The cmd.exe in windows is just the shell . Anyway, the reason why I want to use netcat rather than Ssh or telnet is that i want to be able to listen on any port.

  4. #4
    Join Date
    Sep 2004
    Location
    Denver, Colorado
    Posts
    561
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    According to the man pages nc will only support -e if nc was compiled with the GAPING_SECURITY_HOLE compile time option, since it allows users to make arbitrary programs available to anyone on the network. Also port 53 is suppose to be reserved for DNS traffic. Hope this helps.

  5. #5
    Join Date
    Apr 2004
    Location
    Euregio
    Posts
    3,612
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, first of all I have to admit, I don't have an idea what you are going to do.
    But there is the programm called xinetd, that listens to any port and starts applications that are requested. But as far as I understand this app the services have to offer any network services. And a shell deosn't (please prove me wrong, if it is not true). So please see man xinetd

  6. #6
    jimbo Guest
    Just my two cents but I would just use SSH. You can configure it to listen on whatever port you want and not just the default (22).

  7. #7
    Join Date
    Sep 2004
    Location
    Denver, Colorado
    Posts
    561
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could be that Obocaman wants to capture DNS records in which case tcpdump might be the way to go.

  8. #8
    Join Date
    Aug 2019
    Location
    none
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: what is the equivalent to cmd.exe in linux?

    Maybe 15 years late, but this is the first thing that comes up when you google this, so I might as well answer.
    The command to accomplish what you are trying to do is:
    nc -lp 4444 -e /bin/sh
    This will listen on port 4444, and send a shell to whoever connects to it.

  9. #9
    Join Date
    Jul 2004
    Location
    Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
    Age
    74
    Posts
    23,804
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: what is the equivalent to cmd.exe in linux?

    And yes, it's 15 years late, which qualifies as Thread Closed time. Thanks for posting, but please refrain from adding to ancient relics like this.
    Linux & Beer - That TOTALLY Computes!
    Registered Linux User #362651


    Don't use any of my solutions on working computers or near small children.

Similar Threads

  1. What's the Linux equivalent of
    By SlowJet in forum Using Fedora
    Replies: 6
    Last Post: 26th January 2007, 06:33 AM
  2. Quicken equivalent on Linux
    By ltam in forum Using Fedora
    Replies: 11
    Last Post: 26th November 2006, 01:00 PM
  3. Quickbooks equivalent in linux
    By sailu_mvn in forum Using Fedora
    Replies: 3
    Last Post: 28th November 2005, 11:40 AM
  4. looking for linux equivalent to Magix
    By Impeteperry in forum Using Fedora
    Replies: 4
    Last Post: 15th June 2004, 04:31 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •